Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void chunkUnload(ChunkUnloadEvent event){
- for(Entity entity:event.getChunk().getEntities()){
- for(GameInstance gameInstance:plugin.getGameInstanceManager().getGameInstances()){
- if(entity.getWorld().getName().equals(gameInstance.getStartLocation().getWorld()) &&entity.getLocation().distance(gameInstance.getStartLocation()) <300)
- entity.remove();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement