1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Item Frame steal

Discussion in 'Help' started by Voli, Jul 6, 2017.

  1. Voli

    Voli Spider

    Messages:
    9
    GitHub:
    VoliPlays
    Hello, how I can disable the event when a non op player steal the item from a item frame?
    Thanks!
     
  2. WinterBuild7074

    WinterBuild7074 Zombie Pigman

    Messages:
    693
    GitHub:
    winterbuild7074
    PHP:
    public function onTouch(PlayerInteractEvent $event) {
        
    $player $event->getPlayer();
        if(!
    $player->isOp()) {
            
    $event->setCancelled();
        }
    }
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.