Ejemplo n.º 1
0
 public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws Exception {
   if (splitted[0].equalsIgnoreCase("reloadmap")) {
     if (splitted.length < 2) {
       mc.dropMessage("If you don't know how to use it. You should't be using it.");
       return;
     }
     int mapid = Integer.parseInt(splitted[1]);
     MapleMap map = c.getChannelServer().getMapFactory().getMap(mapid);
     map.deleteAndReloadMap();
   } else if (splitted[0].equalsIgnoreCase("reloaddropspawn")) {
     try {
       TimerManager.getInstance().stop();
     } catch (Exception e) {
       mc.dropMessage("Error : " + e);
       e.printStackTrace();
     } finally {
       try {
         TimerManager tMan = TimerManager.getInstance();
         tMan.start();
         mc.dropMessage("Success");
       } catch (Exception e) {
         mc.dropMessage("Error : " + e);
         e.printStackTrace();
       }
     }
   } else if (splitted[0].equalsIgnoreCase("resetreactors")) {
     c.getPlayer().getMap().resetReactors();
   }
 }