mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Merge branch 'master' of https://github.com/CitizensDev/Citizens2
This commit is contained in:
commit
63023cc54f
@ -1075,7 +1075,7 @@ public class NPCCommands {
|
|||||||
}
|
}
|
||||||
Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
|
Location prev = npc.isSpawned() ? npc.getEntity().getLocation() : null;
|
||||||
npc.despawn(DespawnReason.PENDING_RESPAWN);
|
npc.despawn(DespawnReason.PENDING_RESPAWN);
|
||||||
npc.setName(newName);
|
npc.setName(Colorizer.parseColors(newName));
|
||||||
if (prev != null)
|
if (prev != null)
|
||||||
npc.spawn(prev);
|
npc.spawn(prev);
|
||||||
|
|
||||||
|
@ -354,6 +354,10 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void registerControllerType(EntityType type, Class<? extends MovementController> clazz) {
|
||||||
|
controllerTypes.put(type, clazz);
|
||||||
|
}
|
||||||
|
|
||||||
private static final Map<EntityType, Class<? extends MovementController>> controllerTypes = Maps
|
private static final Map<EntityType, Class<? extends MovementController>> controllerTypes = Maps
|
||||||
.newEnumMap(EntityType.class);
|
.newEnumMap(EntityType.class);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user