mirror of
https://github.com/plexusorg/Module-TFMExtras.git
synced 2024-12-22 09:17:37 +00:00
Removed the redundant variable declaration and changed the permission name.
This commit is contained in:
parent
5908c96cf4
commit
ab17e05cf7
@ -61,7 +61,7 @@ public class ClownfishCommand extends PlexCommand
|
|||||||
}
|
}
|
||||||
else if (args[0].equals("restrict") && args.length == 2)
|
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]);
|
PlexPlayer target = DataUtils.getPlayer(args[1]);
|
||||||
if (target == null)
|
if (target == null)
|
||||||
@ -99,7 +99,7 @@ public class ClownfishCommand extends PlexCommand
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull List<String> smartTabComplete(@NotNull CommandSender sender, @NotNull String alias, @NotNull String[] args) throws IllegalArgumentException {
|
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)
|
if (args.length == 1)
|
||||||
{
|
{
|
||||||
@ -110,8 +110,7 @@ public class ClownfishCommand extends PlexCommand
|
|||||||
return PlexUtils.getPlayerNameList();
|
return PlexUtils.getPlayerNameList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (args.length == 1)
|
||||||
if (args.length == 1)
|
|
||||||
{
|
{
|
||||||
return List.of("toggle");
|
return List.of("toggle");
|
||||||
}
|
}
|
||||||
|
@ -74,8 +74,7 @@ public class ClownfishListener extends PlexListener
|
|||||||
{
|
{
|
||||||
target.setFlying(false);
|
target.setFlying(false);
|
||||||
|
|
||||||
final Sound[] listOfSounds = Sound.values();
|
for (Sound sound : Sound.values())
|
||||||
for (Sound sound : listOfSounds)
|
|
||||||
{
|
{
|
||||||
if (sound.toString().contains("HIT"))
|
if (sound.toString().contains("HIT"))
|
||||||
{
|
{
|
||||||
@ -92,8 +91,7 @@ public class ClownfishListener extends PlexListener
|
|||||||
|
|
||||||
if (!pushedPlayers.isEmpty())
|
if (!pushedPlayers.isEmpty())
|
||||||
{
|
{
|
||||||
final Sound[] listOfSounds = Sound.values();
|
for (Sound sound : Sound.values())
|
||||||
for (Sound sound : listOfSounds)
|
|
||||||
{
|
{
|
||||||
if (sound.toString().contains("HIT"))
|
if (sound.toString().contains("HIT"))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user