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

Solved Fixed again! lol

Discussion in 'Development' started by LewBr, Oct 30, 2017.

Thread Status:
Not open for further replies.
  1. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Example:
    PHP:
    public function Skin(PlayerChangeSkinEvent $event){
            
    $player $event->getPlayer();
            
    //do anything
        
    }
    This don't work, just don't do anything and don't give me an error on console, how can i fix that?
     
  2. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    are u from leet?
     
  3. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    Nop.
     
  4. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    Maybe register events and implement listener? Also, that code isn't supposed to do anything lol.
     
  5. LewBr

    LewBr Zombie

    Messages:
    385
    GitHub:
    lewbr
    So, what events are you saying?
     
  6. QuiverlyRivalry

    QuiverlyRivalry Zombie Pigman

    Messages:
    491
    GitHub:
    quiverlyrivalry
    like on listener, and if player leaves do a task?
     
  7. NickTehUnicorn

    NickTehUnicorn Zombie

    Messages:
    200
    GitHub:
    unickorn
    You should register events by doing the following if you have used events:
    PHP:
    $this->getServer()->getPluginManager()->registerEvents($this$this);
    Also, don't forget to add implements Listener to your class.
    PHP:
    class Main extends PluginBase implements Listener{
     
  8. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    Can you stop renaming thread titles ?
    It can help other people with same problem..
     
  9. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    agreed, titles are not meant to be reflect current thread status
    there's a reason there's a marked flare
     
    NickTehUnicorn likes this.
Thread Status:
Not open for further replies.
  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.