コード例 #1
0
 @Override
 public void call(MessageRunner runner) {
   if (OrbSpawnableMobs.classList.remove(
       EntityList.stringToClassMapping.get(runner.getString("id"))))
     MessageLogger.logOk("Removed 1 mob from the list.");
   else MessageLogger.logFail("The mob was not present in the list.");
 }
コード例 #2
0
        @Override
        public void call(MessageRunner runner) {
          Class<?> cls = (Class<?>) EntityList.stringToClassMapping.get(runner.getString("id"));

          if (IBossDisplayData.class.isAssignableFrom(cls))
            MessageLogger.logFail("Cannot add boss mobs to the list.");
          else if (OrbSpawnableMobs.classList.add(cls))
            MessageLogger.logOk("Added 1 mob to the list.");
          else MessageLogger.logFail("The mob was already in the list.");
        }