Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. @EventHandler
  2. public void chunkUnload(ChunkUnloadEvent event){
  3. for(Entity entity:event.getChunk().getEntities()){
  4. for(GameInstance gameInstance:plugin.getGameInstanceManager().getGameInstances()){
  5. if(entity.getWorld().getName().equals(gameInstance.getStartLocation().getWorld()) &&entity.getLocation().distance(gameInstance.getStartLocation()) <300)
  6. entity.remove();
  7. }
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement