Tyzun
Старожил
- Баллы
- 153
- Имя в Minecraft
- _Tyzun_
Хочу заблочить выбрасывание зелий в годе, пишу вот так:
или так
И еще пару подобных вариантов, не работает ничего
Код:
@EventHandler
public void onPlayerInteract3(PlayerInteractEvent e)
{
User p = (User)e.getPlayer();
if (((e.getAction() == Action.RIGHT_CLICK_AIR) || (e.getAction() == Action.RIGHT_CLICK_BLOCK)) &&
(p.isGodModeEnabled()))
{
if(
(p.getItemInHand().getTypeId() == 373) && (!p.hasPermission("agp.godpotions"))){
e.setCancelled(true);
}
}
}
Код:
@EventHandler
@EventHandler
public void onPlayerInteract3(PlayerInteractEvent e)
{
Entity p = e.getPlayer();
if (((e.getAction() == Action.RIGHT_CLICK_AIR) || (e.getAction() == Action.RIGHT_CLICK_BLOCK)) &&
(ess.getUser(p).isGodModeEnabled()))
{
if(
(((PlayerExtension) p).getItemInHand().getTypeId() == 373) && (!((PlayerExtension) p).hasPermission("agp.godpotions"))){
e.setCancelled(true);
}
}
}
И еще пару подобных вариантов, не работает ничего