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