Cleanup verbose handler & only send sponge OP command notification if the sender has permission
This commit is contained in:
@@ -296,8 +296,8 @@ public class LPSpongePlugin implements LuckPermsPlugin {
|
||||
|
||||
@Listener
|
||||
public void onDisable(GameStoppingServerEvent event) {
|
||||
permissionVault.setShutdown(true);
|
||||
verboseHandler.setShutdown(true);
|
||||
permissionVault.shutdown();
|
||||
verboseHandler.shutdown();
|
||||
|
||||
getLog().info("Closing storage...");
|
||||
storage.shutdown();
|
||||
|
||||
@@ -196,7 +196,7 @@ public class SpongeListener {
|
||||
if (source == null) return;
|
||||
|
||||
final String name = e.getCommand().toLowerCase();
|
||||
if (name.equals("op") || name.equals("deop")) {
|
||||
if (((name.equals("op") || name.equals("minecraft:op")) && source.hasPermission("minecraft.command.op")) || ((name.equals("deop") || name.equals("minecraft:deop")) && source.hasPermission("minecraft.command.deop"))) {
|
||||
Message.OP_DISABLED_SPONGE.send(plugin.getSenderFactory().wrap(source));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ public class PersistedSubject implements LPSubject {
|
||||
@Override
|
||||
public Tristate getPermissionValue(@NonNull ImmutableContextSet contexts, @NonNull String node) {
|
||||
Tristate t = permissionLookupCache.get(PermissionLookup.of(node, contexts));
|
||||
service.getPlugin().getVerboseHandler().offerCheckData(CheckOrigin.INTERNAL, "local:" + getParentCollection().getIdentifier() + "/" + identifier, contexts, node, t);
|
||||
service.getPlugin().getVerboseHandler().offerCheckData(CheckOrigin.INTERNAL, getParentCollection().getIdentifier() + "/" + identifier, contexts, node, t);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user