예제 #1
0
 @Override
 public void load(Storage profiles, int UID) {
   unlimitedMana = profiles.getBoolean(UID + ".wizard.unlimited-mana");
   time = profiles.getString(UID + ".wizard.time", "morning");
   mode =
       (profiles.keyExists(UID + ".wizard.mode")
               && WizardMode.parse(profiles.getString(UID + ".wizard.mode")) != null)
           ? WizardMode.parse(profiles.getString(UID + ".wizard.mode"))
           : WizardMode.TELEPORT;
   mana = profiles.getInt(UID + ".wizard.mana", 10);
   locations.clear();
   for (String location : splitter.split(profiles.getString(UID + ".wizard.locations"))) {
     locations.add(location.replace("(", "").replace(")", ""));
   }
   mob =
       (CreatureType.fromName(profiles.getString(UID + ".wizard.mob")) != null)
           ? CreatureType.fromName(profiles.getString(UID + ".wizard.mob"))
           : CreatureType.CREEPER;
   mobIndex = mob.ordinal();
 }
예제 #2
0
 @Deprecated
 public CreatureType getCreatureType() {
   return CreatureType.fromName(spawner.getMobEntity().getEntityName());
 }