1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 02:59:06 +02:00

Patching gamemode and god toggles to not match on ' '

This commit is contained in:
KHobbits
2011-12-02 21:32:32 +00:00
parent 68c873ea0d
commit 293e7b04a2
2 changed files with 2 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ public class Commandgamemode extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.gamemode.others"))
if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.gamemode.others"))
{
gamemodeOtherPlayers(server, user, args[0]);
return;

View File

@@ -28,7 +28,7 @@ public class Commandgod extends EssentialsCommand
@Override
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{
if (args.length > 0 && user.isAuthorized("essentials.god.others"))
if (args.length > 0 && !args[0].trim().isEmpty() && user.isAuthorized("essentials.god.others"))
{
godOtherPlayers(server, user, args[0]);
return;