This commit is contained in:
fullwall 2014-03-04 19:47:22 +08:00
commit 63023cc54f
2 changed files with 5 additions and 1 deletions

View File

@ -1075,7 +1075,7 @@ public class NPCCommands {
}
Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
npc.despawn(DespawnReason.PENDING_RESPAWN);
npc.setName(newName);
npc.setName(Colorizer.parseColors(newName));
if (prev != null)
npc.spawn(prev);

View File

@ -353,6 +353,10 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
handle.motY *= 0.98F;
}
}
public static void registerControllerType(EntityType type, Class<? extends MovementController> clazz) {
controllerTypes.put(type, clazz);
}
private static final Map<EntityType, Class<? extends MovementController>> controllerTypes = Maps
.newEnumMap(EntityType.class);