Examples of NPCLocation


Examples of net.citizensnpcs.misc.NPCLocation

            }
        });
    }

    private void despawn(HumanNPC npc) {
        toRespawn.put(npc.getOwner(), new NPCLocation(npc.getLocation(), npc.getUID(), npc.getOwner()));
        NPCManager.despawn(npc.getUID(), NPCRemoveReason.DEATH);
    }
View Full Code Here

Examples of net.citizensnpcs.misc.NPCLocation

            return;
        // Stores NPC location/name for later respawn.
        for (HumanNPC npc : NPCManager.getList().values()) {
            if (event.getWorld().equals(npc.getWorld()) && event.getChunk().getX() == npc.getChunkX()
                    && event.getChunk().getZ() == npc.getChunkZ()) {
                NPCLocation loc = new NPCLocation(npc.getLocation(), npc.getUID(), npc.getOwner());
                toRespawn.put(loc, npc.getUID());
                PropertyManager.save(npc);
                NPCManager.safeDespawn(npc);
                Messaging.debug("Despawned", npc.getUID(), "due to chunk unload at", npc.getChunkX(), npc.getChunkZ());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.