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

help

Comments in 'Plugin Development' started by Artide, May 3, 2015.

  1. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Hi, I'm making a custom plugin but I need help, I already know how to set the players name on a sign when they tap it, but how do I make it unset the players name when they tap it again?
  2. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Store player names in an array.
  3. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Use PlayerInteractEvent ;)
  4. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    I know that.
    Example?
  5. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    He said tapping it twice, so it'll be like this:
    PHP:
    if(isset($this->array[$player->getName()]){
    unset(
    $this->array[$player->getName());
    }
    else{
    $this->array[$player->getName()] = true;
    }
    PEMapModder and EvolSoft like this.
  6. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Hmm--- I'll try :)
  7. Gamecrafter
    Offline

    Gamecrafter Notable Member Plugin Developer

    Joined:
    Nov 20, 2014
    Posts:
    978
    Plugins:
    9
    Also learn PHP and the API in the process.
  8. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Yes, I know some php, Its kind of easy.

Share This Page

Advertisement