diff --git a/src/main/java/com/comandante/creeper/command/admin/BuildCommand.java b/src/main/java/com/comandante/creeper/command/admin/BuildCommand.java index 5a3064ce7c329846aef5337d3a5994fcc311eaea..af74071a65fdd0dec806319c373cd8b4c81ee5ea 100644 --- a/src/main/java/com/comandante/creeper/command/admin/BuildCommand.java +++ b/src/main/java/com/comandante/creeper/command/admin/BuildCommand.java @@ -98,6 +98,10 @@ public class BuildCommand extends Command { return; } } else if (desiredBuildDirection.equalsIgnoreCase("enter")) { + if (originalMessageParts.size() != 3) { + channelUtils.write(playerId, "Must specify a name for new \"enter\""); + return; + } String enterName = originalMessageParts.get(2); Integer newRoomId = findUnusedRoomId(); Integer newFloorId = findUnusedFloorId(); @@ -116,9 +120,7 @@ public class BuildCommand extends Command { } channelUtils.write(playerId, "Room already exists at that location."); } - } finally - - { + } finally { super.messageReceived(ctx, e); }