diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandburn.java | 6 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java | 10 | ||||
-rw-r--r-- | Essentials/src/config.yml | 1 | ||||
-rw-r--r-- | Essentials/src/plugin.yml | 2 |
4 files changed, 17 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandburn.java b/Essentials/src/com/earth2me/essentials/commands/Commandburn.java index 5d8d38ce7..c951fae97 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandburn.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandburn.java @@ -20,6 +20,12 @@ public class Commandburn extends EssentialsCommand { throw new NotEnoughArgumentsException(); } + + //TODO: TL this + if (args[0].trim().length() < 2) + { + throw new NotEnoughArgumentsException("You need to specify a player to kill."); + } for (Player p : server.matchPlayer(args[0])) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java b/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java index af4bafc4b..85aeaa673 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgamemode.java @@ -52,6 +52,9 @@ public class Commandgamemode extends EssentialsCommand return; } } + if (gameMode == null) { + gameMode = user.getGameMode() == GameMode.SURVIVAL ? GameMode.CREATIVE : user.getGameMode() == GameMode.CREATIVE ? GameMode.ADVENTURE : GameMode.SURVIVAL; + } user.setGameMode(gameMode); user.sendMessage(_("gameMode", _(user.getGameMode().toString().toLowerCase(Locale.ENGLISH)), user.getDisplayName())); } @@ -59,7 +62,7 @@ public class Commandgamemode extends EssentialsCommand private void gamemodeOtherPlayers(final Server server, final CommandSender sender, final GameMode gameMode, final String player) throws NotEnoughArgumentsException { //TODO: TL this - if (player.trim().length() < 2) + if (player.trim().length() < 2 || gameMode == null) { throw new NotEnoughArgumentsException("You need to specify a valid player/mode."); } @@ -100,6 +103,11 @@ public class Commandgamemode extends EssentialsCommand { mode = GameMode.ADVENTURE; } + else if (modeString.equalsIgnoreCase("gmt") || modeString.equalsIgnoreCase("egmt") + || modeString.contains("toggle") || modeString.contains("cycle") || modeString.equalsIgnoreCase("t")) + { + mode = null; + } else { throw new NotEnoughArgumentsException(); } diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 33e59449b..9c09d75a6 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -299,6 +299,7 @@ no-god-in-worlds: # Set to true to enable per-world permissions for teleporting between worlds with essentials commands # This applies to /world, /back, /tp[a|o][here|all], but not warps. # Give someone permission to teleport to a world with essentials.world.<worldname> +# This does not effect the /home command, there is a seperate toggle below for this. world-teleport-permissions: false # The number of items given if the quantity parameter is left out in /item or /give. diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml index 899c20de6..42a36e5a5 100644 --- a/Essentials/src/plugin.yml +++ b/Essentials/src/plugin.yml @@ -122,7 +122,7 @@ commands: gamemode: description: Change player gamemode. usage: /<command> <survival|creative|adventure> [player] - aliases: [gm,creative,creativemode,survival,survivalmode,adventure,adventuremode,gmc,gma,gms,egamemod,eecreative,ecreativemode,esurvival,esurvivalmode,eadventure,eadventuremode,egmc,egma,egms,egm] + aliases: [gm,creative,creativemode,survival,survivalmode,adventure,adventuremode,gmc,gma,gms,gmt,egamemod,eecreative,ecreativemode,esurvival,esurvivalmode,eadventure,eadventuremode,egmc,egma,egms,egm,egmt] getpos: description: Get your current coordinates or those of a player. usage: /<command> [player] |