mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-08-22 22:22:56 +02:00
Revert "Add extra check to ensure RedisBungee is loaded (#2981)"
This reverts commit a68a5d91c4
.
This commit is contained in:
@@ -150,7 +150,7 @@ public class LPBungeePlugin extends AbstractLuckPermsPlugin {
|
|||||||
this.contextManager.registerCalculator(playerCalculator);
|
this.contextManager.registerCalculator(playerCalculator);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!disabledContexts.contains("proxy") && this.bootstrap.getProxy().getPluginManager().getPlugin("RedisBungee") != null && isRedisBungeeLoaded()) {
|
if (!disabledContexts.contains("proxy") && this.bootstrap.getProxy().getPluginManager().getPlugin("RedisBungee") != null) {
|
||||||
this.contextManager.registerCalculator(new RedisBungeeCalculator());
|
this.contextManager.registerCalculator(new RedisBungeeCalculator());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -199,19 +199,6 @@ public class LPBungeePlugin extends AbstractLuckPermsPlugin {
|
|||||||
return this.senderFactory.wrap(this.bootstrap.getProxy().getConsole());
|
return this.senderFactory.wrap(this.bootstrap.getProxy().getConsole());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean classExists(String className) {
|
|
||||||
try {
|
|
||||||
Class.forName(className);
|
|
||||||
return true;
|
|
||||||
} catch (ClassNotFoundException e) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean isRedisBungeeLoaded() {
|
|
||||||
return classExists("com.imaginarycode.minecraft.redisbungee.RedisBungee");
|
|
||||||
}
|
|
||||||
|
|
||||||
public BungeeSenderFactory getSenderFactory() {
|
public BungeeSenderFactory getSenderFactory() {
|
||||||
return this.senderFactory;
|
return this.senderFactory;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user