Skip to content

Commit

Permalink
add error message to /py if API not started
Browse files Browse the repository at this point in the history
  • Loading branch information
arpruss committed Jul 28, 2016
1 parent a889a7d commit 8b75961
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ public void execute(MinecraftServer server, ICommandSender sender, String[] args
environment.put("MINECRAFT_API_PORT", "4711"); // presumed server port
}
else {
if (RaspberryJamMod.currentPortNumber < 0)
throw new CommandException("RaspberryJamMod API not started. Check for port conflicts.");
environment.put("MINECRAFT_API_HOST","localhost");
environment.put("MINECRAFT_API_PORT", ""+RaspberryJamMod.currentPortNumber);
}
Expand Down

0 comments on commit 8b75961

Please sign in to comment.