Package org.bukkit.event.player

Examples of org.bukkit.event.player.PlayerItemHeldEvent


        if (slot == oldSlot) {
            // ignore
            return;
        }

        PlayerItemHeldEvent event = new PlayerItemHeldEvent(player, oldSlot, slot);
        EventFactory.callEvent(event);

        if (!event.isCancelled()) {
            player.getInventory().setRawHeldItemSlot(slot);
        } else {
            // sends a packet to switch back to the previous held slot
            player.getInventory().setHeldItemSlot(oldSlot);
        }
View Full Code Here

TOP

Related Classes of org.bukkit.event.player.PlayerItemHeldEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.