mirror of
https://github.com/taoneill/war.git
synced 2024-11-14 06:17:01 +01:00
Merge pull request #276 from taoneill/clearDrops
Closes gh-269. Removing drops at initializing
This commit is contained in:
commit
73e29c2025
@ -11,6 +11,9 @@ import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.craftbukkit.entity.CraftItem;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -260,6 +263,16 @@ public class Warzone {
|
||||
}
|
||||
|
||||
this.flagThieves.clear();
|
||||
|
||||
// nom drops
|
||||
for(Entity entity : (this.getWorld().getEntities())) {
|
||||
if (!(entity instanceof Item) && !(entity instanceof CraftItem)) continue;
|
||||
// validate position
|
||||
if (!this.getVolume().contains(entity.getLocation())) continue;
|
||||
|
||||
// omnomnomnom
|
||||
entity.remove();
|
||||
}
|
||||
}
|
||||
|
||||
public void endRound() {
|
||||
|
Loading…
Reference in New Issue
Block a user