Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

when player touch something, make the player get killed

Comments in 'Plugin Development' started by LoveToBeDev, Aug 22, 2015.

  1. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    I got that but for him it's the same almost the same i guess.
  2. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    I used this code (won't work):
    PHP:
    public function onInt(PlayerInteractEvent $ev){
    if (\
    in_array($ev->getBlock()->getId(),[63,68])){
    $this->getLogger()->info($ev->getPlayer()->getName()." has touched Sign right now!");
    }
    }
    However, players touch sign, console doesn't show any info. Players touch wall sign, console doesn't show
    PianoPlayer38 and TheKofola12 like this.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Did you register Listener?
    PianoPlayer38 likes this.
  4. Kvetinac97
    Offline

    Kvetinac97 Active Member Plugin Developer

    Joined:
    Nov 17, 2014
    Posts:
    276
    Plugins:
    1
    Minecraft User:
    Kvetinac97
    I forgot. Thank you
    PianoPlayer38 and TheKofola12 like this.

Share This Page

Advertisement