mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27:37 +00:00
Fix out of bounds exception - closes #54
This commit is contained in:
parent
344d890877
commit
e39f882ea7
@ -35,6 +35,8 @@ public class DebugCMD extends PlexCommand
|
|||||||
return usage();
|
return usage();
|
||||||
}
|
}
|
||||||
if (args[0].equalsIgnoreCase("redis-reset"))
|
if (args[0].equalsIgnoreCase("redis-reset"))
|
||||||
|
{
|
||||||
|
if (args.length == 2)
|
||||||
{
|
{
|
||||||
Player player = getNonNullPlayer(args[1]);
|
Player player = getNonNullPlayer(args[1]);
|
||||||
if (plugin.getRedisConnection().getJedis().exists(player.getUniqueId().toString()))
|
if (plugin.getRedisConnection().getJedis().exists(player.getUniqueId().toString()))
|
||||||
@ -44,6 +46,7 @@ public class DebugCMD extends PlexCommand
|
|||||||
}
|
}
|
||||||
return componentFromString("Couldn't find player in Redis punishments.");
|
return componentFromString("Couldn't find player in Redis punishments.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (args[0].equalsIgnoreCase("gamerules"))
|
if (args[0].equalsIgnoreCase("gamerules"))
|
||||||
{
|
{
|
||||||
for (World world : Bukkit.getWorlds())
|
for (World world : Bukkit.getWorlds())
|
||||||
@ -63,6 +66,8 @@ public class DebugCMD extends PlexCommand
|
|||||||
return mmString("<aqua>Re-applied game all the game rules!");
|
return mmString("<aqua>Re-applied game all the game rules!");
|
||||||
}
|
}
|
||||||
if (args[0].equalsIgnoreCase("aliases"))
|
if (args[0].equalsIgnoreCase("aliases"))
|
||||||
|
{
|
||||||
|
if (args.length == 2)
|
||||||
{
|
{
|
||||||
String commandName = args[1];
|
String commandName = args[1];
|
||||||
Command command = plugin.getServer().getCommandMap().getCommand(commandName);
|
Command command = plugin.getServer().getCommandMap().getCommand(commandName);
|
||||||
@ -72,7 +77,8 @@ public class DebugCMD extends PlexCommand
|
|||||||
}
|
}
|
||||||
return mmString("<aqua>Aliases for " + commandName + " are: " + Arrays.toString(command.getAliases().toArray(new String[0])));
|
return mmString("<aqua>Aliases for " + commandName + " are: " + Arrays.toString(command.getAliases().toArray(new String[0])));
|
||||||
}
|
}
|
||||||
return null;
|
}
|
||||||
|
return usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user