mirror of
https://github.com/RayzsYT/ProAntiTab.git
synced 2026-11-30 20:39:53 -05:00
Shorten Code
This commit is contained in:
1 parent
17cf06652e
commit
2d13095601
2 files changed
+2
-5
No files matched your search
@@ -39,8 +39,7 @@ public class LegacyPacketHandler implements PacketHandler {
|
||||
input = input.replace("/", "");
|
||||
if(input.contains(" ")) input = input.split(" ")[0];
|
||||
|
||||
cancelsBeforeHand = Storage.Blacklist.isListed(input, true) && !PermissionUtil.hasBypassPermission(player, input)
|
||||
|| Storage.Blacklist.isListed(input, false) && !PermissionUtil.hasBypassPermission(player, input);
|
||||
cancelsBeforeHand = Storage.Blacklist.isListed(input, !Storage.ConfigSections.Settings.TURN_BLACKLIST_TO_WHITELIST.ENABLED);
|
||||
}
|
||||
|
||||
for (Field field : Reflection.getFields(packetObj)) {
|
||||
|
||||
@@ -50,8 +50,7 @@ public class ModernPacketHandler implements PacketHandler {
|
||||
String[] split = input.split(" ");
|
||||
if(input.contains(" ")) input = split[0];
|
||||
|
||||
cancelsBeforeHand = !Storage.ConfigSections.Settings.TURN_BLACKLIST_TO_WHITELIST.ENABLED && Storage.Blacklist.isListed(input, true) && !PermissionUtil.hasBypassPermission(player, input)
|
||||
|| Storage.ConfigSections.Settings.TURN_BLACKLIST_TO_WHITELIST.ENABLED && !Storage.Blacklist.isListed(input, false) && !PermissionUtil.hasBypassPermission(player, input);
|
||||
cancelsBeforeHand = Storage.Blacklist.isListed(input, !Storage.ConfigSections.Settings.TURN_BLACKLIST_TO_WHITELIST.ENABLED);
|
||||
}
|
||||
|
||||
Suggestions suggestions = (Suggestions) suggestionObj;
|
||||
@@ -64,7 +63,6 @@ public class ModernPacketHandler implements PacketHandler {
|
||||
|
||||
suggestions.getList().removeIf(suggestion -> {
|
||||
String command = suggestion.getText();
|
||||
System.out.println(command);
|
||||
return Storage.Blacklist.isBlocked(player, command);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user