File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
bukkit/src/main/java/com/github/games647/fastlogin/bukkit Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -100,15 +100,25 @@ public void initialize() {
100100 }
101101
102102 private boolean detectBungeeCord () throws Exception {
103+ boolean enabledBungee = false ;
104+ boolean enabledVelocity = false ;
103105 try {
104- enabled = Class .forName ("org.spigotmc.SpigotConfig" ).getDeclaredField ("bungee" ).getBoolean (null );
105- return enabled ;
106+ enabledBungee = Class .forName ("org.spigotmc.SpigotConfig" ).getDeclaredField ("bungee" ).getBoolean (null );
106107 } catch (ClassNotFoundException notFoundEx ) {
107108 //ignore server has no bungee support
108- return false ;
109109 } catch (Exception ex ) {
110110 throw ex ;
111111 }
112+
113+ try {
114+ enabledVelocity = Class .forName ("com.destroystokyo.paper.PaperConfig" ).getDeclaredField ("velocitySupport" ).getBoolean (null );
115+ } catch (ClassNotFoundException notFoundEx ) {
116+ //ignore server has no velocity support
117+ } catch (Exception ex ) {
118+ throw ex ;
119+ }
120+
121+ return enabledBungee || enabledVelocity ;
112122 }
113123
114124 private void registerPluginChannels () {
You can’t perform that action at this time.
0 commit comments