From c6988edd4ffcf3d6db8de13ef1cff3a7a5d71481 Mon Sep 17 00:00:00 2001 From: graywolf336 Date: Wed, 12 Feb 2014 13:14:32 -0600 Subject: [PATCH] Check for null on the transfer arguments. --- .../jail/command/subcommands/JailTransferCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/graywolf336/jail/command/subcommands/JailTransferCommand.java b/src/main/java/com/graywolf336/jail/command/subcommands/JailTransferCommand.java index ce56f86..4dabf67 100644 --- a/src/main/java/com/graywolf336/jail/command/subcommands/JailTransferCommand.java +++ b/src/main/java/com/graywolf336/jail/command/subcommands/JailTransferCommand.java @@ -39,7 +39,7 @@ public class JailTransferCommand implements Command { } //Verify they gave us a player and if so check if they're jailed - if(params.getPlayer().isEmpty()) { + if(params.getPlayer() == null) { sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.PROVIDEAPLAYER, LangString.TRANSFERRING)); return true; }else if(!jm.isPlayerJailed(params.getPlayer())) { @@ -50,7 +50,7 @@ public class JailTransferCommand implements Command { jm.getPlugin().debug("Checking everything before we transfer: " + params.getPlayer()); //If they didn't provide a jail, tell them we need one - if(params.getJail().isEmpty()) { + if(params.getJail() == null) { sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.PROVIDEAJAIL, LangString.TRANSFERRING)); return true; }else { @@ -65,7 +65,7 @@ public class JailTransferCommand implements Command { Cell targetCell = null; //Check if they provided a cell and if so does it exist - if(!params.getCell().isEmpty()) { + if(params.getCell() != null) { if(target.getCell(params.getCell()) == null) { sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.NOCELL, params.getCell())); return true;