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

PlayerQuitEvent, player is null?

Comments in 'Plugin Development' started by WillotheBlessed, Oct 6, 2014.

  1. WillotheBlessed
    Offline

    WillotheBlessed Active Member

    Joined:
    Sep 17, 2014
    Posts:
    69
    Minecraft User:
    will
    I'm having an issue with PlayerQuitEvent. The player is null. What's the point of having this event extend the PlayerEvent if it's going to be null?

    Does this mean I have to manually check and use "IsConnected?" property?

    Thanks in advance.
    LDX likes this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I think either you got it wrong or it is a pm bug.
    EvolSoft, 64FF00 and LDX like this.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    How can you check isConnected if it is null?
    64FF00 and WillotheBlessed like this.
  4. WillotheBlessed
    Offline

    WillotheBlessed Active Member

    Joined:
    Sep 17, 2014
    Posts:
    69
    Minecraft User:
    will
    I have a list of all players and when someone quits, I check who is not connected, and take him out of my lists.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    A list? You're wasting memory... Why don't you just use the server list?

    Also I mean isConnected is a function but you can't call function if a non-object.
    64FF00 likes this.
  6. WillotheBlessed
    Offline

    WillotheBlessed Active Member

    Joined:
    Sep 17, 2014
    Posts:
    69
    Minecraft User:
    will
    Good point... except it's two lists. Otherwise I'd probably never care. But I have a special list for people who join my games late so that I can have a waiting list and a joined list. :cool:
  7. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    PM bug
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    OK. Point out that bug from the source.

Share This Page

Advertisement