Package net.citizensnpcs.misc

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


            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

Related Classes of net.citizensnpcs.misc.NPCLocation

Copyright © 2018 www.massapicom. 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.