ItemListener

public class ItemListener implements Listener

Properties

Link copied to clipboard
public final static ItemListener INSTANCE

Functions

Link copied to clipboard
public final Unit autoBindEntityDamageByEntityEvent(EntityDamageByEntityEvent event)

自动绑定/解绑, 左键实体(其实是攻击动作,但是 PlayerInteractEvent 没有捕获)

Link copied to clipboard
public final Unit autoBindInventoryClickEvent(InventoryClickEvent event)

自动绑定, 点击时绑定

Link copied to clipboard
public final Unit autoBindPlayerDropItemEvent(PlayerDropItemEvent event)

自动绑定, 丢弃物品时绑定

Link copied to clipboard
public final Unit autoBindPlayerInteractEvent(PlayerInteractEvent event)

自动绑定/解绑, 左右键绑定

Link copied to clipboard
public final Unit autoBindPlayerItemDamageEvent(PlayerItemDamageEvent event)
Link copied to clipboard
public final Unit onBlockBreakEvent(BlockBreakEvent event)

物品位于容器中被破坏时的检查

Link copied to clipboard
public final Unit onBlockDispenseEvent(BlockDispenseEvent event)

物品由发射器射出,对于 CatServer 1.12.2 似乎无效

Link copied to clipboard
public final Unit onEntityDamageEvent(EntityDamageEvent event)

检查掉落物被销毁

Link copied to clipboard
public final Unit onInventoryClickEvent2(InventoryClickEvent event)

上面的物品栏标题符合规则时禁止点击(放入)

Link copied to clipboard
public final Unit onInventoryMoveItemEvent(InventoryMoveItemEvent event)

物品由一个容器中到另一个容器中去,如漏斗,对于 CatServer 1.12.2 似乎无效

Link copied to clipboard
public final Unit onInventoryPickupItemEvent(InventoryPickupItemEvent event)

物品被漏斗吸入,对于 CatServer 1.12.2 似乎无效

Link copied to clipboard
public final Unit onItemDespawnEvent(ItemDespawnEvent event)

检查掉落物由原版的5分钟机制消失

Link copied to clipboard
public final Unit onItemSpawnEvent(ItemSpawnEvent event)

处理掉落物的监听器

Link copied to clipboard
public final Unit onLogin(Player player)

玩家登录时检查暂存箱子是否有物品

Link copied to clipboard
public final Unit onPlayerArmorStandManipulateEvent(PlayerArmorStandManipulateEvent event)

盔甲架检查

Link copied to clipboard
public final Unit onPlayerCommandPreprocessEvent(PlayerCommandPreprocessEvent event)

主手拿着物品时禁止输入符合规则的命令

Link copied to clipboard
public final Unit onPlayerDeathEvent(PlayerDeathEvent event)
Link copied to clipboard
public final Unit onPlayerDropItemEvent(PlayerDropItemEvent event)

不能丢

Link copied to clipboard
public final Unit onPlayerInteractEntityEvent(PlayerInteractEntityEvent event)

不能实体互动

Link copied to clipboard
public final Unit onPlayerInteractEvent(PlayerInteractEvent event)

互动检查

Link copied to clipboard
public final Unit onPlayerItemConsumeEvent(PlayerItemConsumeEvent event)

禁止用于消耗(吃)

Link copied to clipboard
public final Unit onPlayerQuit(PlayerQuitEvent event)
Link copied to clipboard
public final Unit onPrepareItemCraftEvent(PrepareItemCraftEvent event)

禁止用于合成