Solved PlayerUUID on PlayerQuitEvent

Discussion in 'Plugin Development' started by ShadX, Dec 2, 2018.

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

    ShadX

    Hello everyone! I'm new to bukkit-coding and also programming so don't beat me, please. :oops:
    How can I get the player UUID on PlayerQuitEvent?
    The main idea is to create String which contains the path to the .json-type file named as "<playerUUID>.json

    Core: craftbukkit-1.7.10-R0.1
     
    Last edited: Dec 2, 2018
  2. Offline

    CraftCreeper6

    @ShadX
    player#getUniqueId();
    returns a java.util.UUID, which can be later parsed into a Player object.
     
    ShadX likes this.
  3. Offline

    The_Spaceman

    returns a java.util.UUID, which can be later parsed into a Player object.
    @ShadX use Bukkit.getPlayer(java.util.UUID); to get the player, it returns null when the player is offline
     
    Last edited: Dec 5, 2018
    ShadX likes this.
Thread Status:
Not open for further replies.

Share This Page