diff --git a/src/main/java/dev/plex/extras/command/ClownfishCommand.java b/src/main/java/dev/plex/extras/command/ClownfishCommand.java index ff026db..b3fe481 100644 --- a/src/main/java/dev/plex/extras/command/ClownfishCommand.java +++ b/src/main/java/dev/plex/extras/command/ClownfishCommand.java @@ -61,7 +61,7 @@ public class ClownfishCommand extends PlexCommand } else if (args[0].equals("restrict") && args.length == 2) { - if (silentCheckPermission(commandSender, "plex.tfmextras.restrictclownfish")) + if (silentCheckPermission(commandSender, "plex.tfmextras.clownfish.restrict")) { PlexPlayer target = DataUtils.getPlayer(args[1]); if (target == null) @@ -99,7 +99,7 @@ public class ClownfishCommand extends PlexCommand @Override public @NotNull List smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException { - if (silentCheckPermission(sender, "plex.tfmextras.restrictclownfish")) + if (silentCheckPermission(sender, "plex.tfmextras.clownfish.restrict")) { if (args.length == 1) { @@ -110,8 +110,7 @@ public class ClownfishCommand extends PlexCommand return PlexUtils.getPlayerNameList(); } } - - if (args.length == 1) + else if (args.length == 1) { return List.of("toggle"); } diff --git a/src/main/java/dev/plex/extras/listener/ClownfishListener.java b/src/main/java/dev/plex/extras/listener/ClownfishListener.java index 09e2765..26e0940 100644 --- a/src/main/java/dev/plex/extras/listener/ClownfishListener.java +++ b/src/main/java/dev/plex/extras/listener/ClownfishListener.java @@ -74,8 +74,7 @@ public class ClownfishListener extends PlexListener { target.setFlying(false); - final Sound[] listOfSounds = Sound.values(); - for (Sound sound : listOfSounds) + for (Sound sound : Sound.values()) { if (sound.toString().contains("HIT")) { @@ -92,8 +91,7 @@ public class ClownfishListener extends PlexListener if (!pushedPlayers.isEmpty()) { - final Sound[] listOfSounds = Sound.values(); - for (Sound sound : listOfSounds) + for (Sound sound : Sound.values()) { if (sound.toString().contains("HIT")) {