mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 04:31:58 +01:00
Implemented PLAYER_ITEM_HELD
This commit is contained in:
parent
7369ef7300
commit
c2fdd5cadd
1 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,7 @@ import org.bukkit.event.block.BlockRightClickEvent;
|
|||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.event.player.PlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerItemEvent;
|
||||
import org.bukkit.event.player.PlayerItemHeldEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
// CraftBukkit end
|
||||
|
@ -535,6 +536,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||
}
|
||||
|
||||
public void a(Packet16BlockItemSwitch packet16blockitemswitch) {
|
||||
// Craftbukkit start
|
||||
PlayerItemHeldEvent event = new PlayerItemHeldEvent(Type.PLAYER_ITEM_HELD, getPlayer(), e.inventory.c, packet16blockitemswitch.a);
|
||||
server.getPluginManager().callEvent(event);
|
||||
// Craftbukkit end
|
||||
|
||||
this.e.inventory.c = packet16blockitemswitch.a;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue