From 06f0a41f07df9239a38ae1880feabec0bd00c8b5 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Sun, 27 Feb 2022 00:45:56 +1300 Subject: [PATCH] Optimize --- .../disguise/disguisetypes/watchers/PlayerWatcher.java | 1 - .../packets/packetlisteners/PacketListenerSounds.java | 6 ------ .../disguise/utilities/params/ParamInfoManager.java | 2 +- .../disguise/utilities/parser/DisguiseParser.java | 1 - .../disguise/utilities/parser/DisguisePermissions.java | 1 - 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java b/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java index 0a860c1b..14b12f9a 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/PlayerWatcher.java @@ -4,7 +4,6 @@ import com.comphenix.protocol.wrappers.WrappedGameProfile; import com.comphenix.protocol.wrappers.nbt.NbtCompound; import com.comphenix.protocol.wrappers.nbt.NbtFactory; import me.libraryaddict.disguise.DisguiseConfig; -import me.libraryaddict.disguise.LibsDisguises; import me.libraryaddict.disguise.disguisetypes.Disguise; import me.libraryaddict.disguise.disguisetypes.MetaIndex; import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java index 45244747..3b6bbcef 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/packets/packetlisteners/PacketListenerSounds.java @@ -23,12 +23,6 @@ import java.util.Set; public class PacketListenerSounds extends PacketAdapter { - /** - * This is a fix for the stupidity that is "I can't separate the sounds from the sounds the player - * heard, and the sounds of the entity tracker heard" - */ - private static boolean cancelSound; - public PacketListenerSounds(LibsDisguises plugin) { super(plugin, ListenerPriority.NORMAL, Server.NAMED_SOUND_EFFECT); } diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoManager.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoManager.java index 11957033..6121d5d4 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoManager.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/params/ParamInfoManager.java @@ -47,7 +47,7 @@ public class ParamInfoManager { } public static ParamInfo getParamInfo(WatcherMethod method) { - if (method.getName().equals("setSoundGroup")) { + if (method.getName().equalsIgnoreCase("setSoundGroup")) { return getParamInfoSoundGroup(); } diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java index 9ae13e33..02f6e143 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java @@ -30,7 +30,6 @@ import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.inventory.EntityEquipment; import org.bukkit.inventory.ItemStack; -import org.bukkit.permissions.PermissionAttachmentInfo; import org.bukkit.potion.PotionEffectType; import java.lang.invoke.MethodHandle; diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java index 29cec77c..0c19a821 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguisePermissions.java @@ -2,7 +2,6 @@ package me.libraryaddict.disguise.utilities.parser; import me.libraryaddict.disguise.DisguiseConfig; import me.libraryaddict.disguise.disguisetypes.DisguiseType; -import org.bukkit.command.CommandSender; import org.bukkit.entity.Ageable; import org.bukkit.entity.Animals; import org.bukkit.entity.Monster;