469470471472473474475476477478479
return; } Coordinate c = new Coordinate(x, y, z); try { NpcBot s = new NpcBot(name, event.name, server, c); server.bots.connect(s); eventHost.npcs.put(name, s); } catch (IOException ex) { notifyError("Could not spawn NPC!"); ex.printStackTrace();
488489490491492493494495496497498499500501502503504505
notifyError("Wrong number of arguments!"); return; } String name = new PostfixEvaluator(this).evaluateSingle(tokens); NpcBot b = eventHost.npcs.remove(name); if (b == null) { notifyError("An NPC with this name is not logged on!"); return; } try { b.logout(); } catch (IOException e) { notifyError("Error while logging out bot!"); e.printStackTrace(); } }