PC-629
This commit is contained in:
parent
99534e19c5
commit
e45e27ba34
@ -14,6 +14,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
@ -127,11 +128,24 @@ public class HotbarEditor extends MiniPlugin
|
||||
|
||||
if (UtilItem.isSimilar(item, _item, UtilItem.ItemAttribute.NAME))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
HotbarInventory.open(event.getPlayer(), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onInteract(PlayerInteractEntityEvent event)
|
||||
{
|
||||
ItemStack item = event.getPlayer().getItemInHand();
|
||||
|
||||
if (UtilItem.isSimilar(item, _item, UtilItem.ItemAttribute.NAME))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
HotbarInventory.open(event.getPlayer(), this);
|
||||
}
|
||||
}
|
||||
|
||||
public Gladiators getHost()
|
||||
{
|
||||
return _host;
|
||||
|
Loading…
Reference in New Issue
Block a user