Search in sources :

Example 1 with VirtualItemDisplay

use of io.github.bananapuncher714.crafters.display.VirtualItemDisplay in project PublicCrafters by BananaPuncher714.

the class PlayerListener method onItemDisplayCreateEvent.

@EventHandler(priority = EventPriority.HIGHEST)
private void onItemDisplayCreateEvent(ItemDisplayCreateEvent event) {
    if (!plugin.isVirtual()) {
        return;
    }
    ItemDisplay display = event.getItemDisplay();
    VirtualItemDisplay vDisplay = new VirtualItemDisplay(display.getCraftDisplay(), display.getLocation(), display.getItem(), display.getSlot());
    event.setItemDisplay(vDisplay);
}
Also used : VirtualItemDisplay(io.github.bananapuncher714.crafters.display.VirtualItemDisplay) ItemDisplay(io.github.bananapuncher714.crafters.display.ItemDisplay) VirtualItemDisplay(io.github.bananapuncher714.crafters.display.VirtualItemDisplay) EventHandler(org.bukkit.event.EventHandler)

Aggregations

ItemDisplay (io.github.bananapuncher714.crafters.display.ItemDisplay)1 VirtualItemDisplay (io.github.bananapuncher714.crafters.display.VirtualItemDisplay)1 EventHandler (org.bukkit.event.EventHandler)1