mirror of
https://e.coding.net/circlecloud/QuickShop.git
synced 2024-12-28 07:58:49 +00:00
add Despawn Event and update item config...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
parent
149e5564db
commit
a6fcfbcc85
@ -4,7 +4,9 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.ItemDespawnEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryMoveItemEvent;
|
||||
import org.bukkit.event.inventory.InventoryPickupItemEvent;
|
||||
@ -64,6 +66,15 @@ public class ProtectListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onItemDespawn(final ItemDespawnEvent e) {
|
||||
final ItemStack ci = e.getEntity().getItemStack();
|
||||
if (MarkUtil.hasMark(ci)) {
|
||||
ci.setType(Material.AIR);
|
||||
e.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerHandlerItem(final PlayerItemHeldEvent e) {
|
||||
final Player p = e.getPlayer();
|
||||
|
@ -294,7 +294,7 @@ ENDER_PEARL: 末地传送门
|
||||
BLAZE_ROD: 烈焰棒
|
||||
GHAST_TEAR: 恶魂之泪
|
||||
GOLD_NUGGET: 金粒
|
||||
NETHER_STALK: NETHER_STALK
|
||||
NETHER_STALK: 地狱疣
|
||||
POTION: 药水
|
||||
GLASS_BOTTLE: 玻璃瓶
|
||||
SPIDER_EYE: 蜘蛛眼
|
||||
|
Loading…
Reference in New Issue
Block a user