Removed the redundant variable declaration and changed the permission name.

This commit is contained in:
james 2024-03-27 23:30:33 +00:00
parent 5908c96cf4
commit ab17e05cf7
2 changed files with 5 additions and 8 deletions

View File

@ -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<String> 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");
}

View File

@ -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"))
{