Creating a fake 'Player' object

Discussion in 'Plugin Development' started by Taien, Feb 8, 2013.

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

    Taien

    Is it possible? I can't figure out a way to do this. Don't ask why I need one, because the explanation would be long. Suffice it to say I need one to make my plugin work with WorldGuard. I considered acquiring an OfflinePlayer with a made up name (like "Notch" :p) but I was told OfflinePlayers will return null if the player hasn't connected to the server before. I also know you can't instantiate a Player. Any suggestions?

    Figured it out. THPlayer implements Player. Badda-boom.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
  2. Offline

    zssz2

    THPlayer?
     
  3. Offline

    Tirelessly

    Custom class he made I assume.
     
  4. Offline

    Taien

    Yeah, just made a class that implements Player. :)
     
  5. Offline

    zssz2

    Ah. Nice to know, thanks for the idea/info.
     
Thread Status:
Not open for further replies.

Share This Page