SimplyPerms/net/crystalyx/bukkit/simplyperms/preventions/loot/Pickup.java
2012-04-29 02:55:03 +02:00

22 lines
662 B
Java

package net.crystalyx.bukkit.simplyperms.preventions.loot;
import net.crystalyx.bukkit.simplyperms.SimplyPlugin;
import net.crystalyx.bukkit.simplyperms.SimplyPrevents;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerPickupItemEvent;
public class Pickup extends SimplyPrevents {
public Pickup(SimplyPlugin plugin) {
super(plugin);
}
@EventHandler(priority = EventPriority.LOWEST)
public void pickup(PlayerPickupItemEvent event) {
prevent(event, event.getPlayer(), "pickup." + event.getItem().getItemStack().getTypeId() + ",loot." + event.getItem().getItemStack().getTypeId());
}
}