mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 12:46:04 +01:00
forgot something
This commit is contained in:
parent
441d6f1eb1
commit
8893bba054
@ -48,12 +48,7 @@ public class CitizensNPCManager implements NPCManager {
|
||||
|
||||
@Override
|
||||
public NPC getNPC(int id) {
|
||||
for (NPC npc : spawned.values()) {
|
||||
if (npc.getId() == id) {
|
||||
return npc;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return byID.get(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -115,6 +110,10 @@ public class CitizensNPCManager implements NPCManager {
|
||||
spawned.remove(mcEntity.getPlayer());
|
||||
}
|
||||
|
||||
public void remove(NPC npc) {
|
||||
byID.remove(npc.getId());
|
||||
}
|
||||
|
||||
private WorldServer getWorldServer(World world) {
|
||||
return ((CraftWorld) world).getHandle();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user