Skip to content
Snippets Groups Projects
Commit 8a225aa4 authored by Chris Kearney's avatar Chris Kearney
Browse files

bounds check

parent b3237c29
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment