Class GlobalProfile

java.lang.Object
org.mvplugins.multiverse.inventories.profile.GlobalProfile

public final class GlobalProfile extends Object
The global profile for a player which contains meta-data for the player.
  • Method Details

    • getStringPropertyHandle

      public org.mvplugins.multiverse.core.config.handle.StringPropertyHandle getStringPropertyHandle()
    • getPlayerUUID

      public UUID getPlayerUUID()
      Returns the UUID of the player.
      Returns:
      the UUID of the player.
    • getLastKnownName

      public String getLastKnownName()
      Returns the last name the player was known to have.
      Returns:
      the last name the player was known to have.
    • setLastKnownName

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setLastKnownName(String lastKnownName)
      Sets the last name that the player was seen having.

      This should be updated when a player's name is changed through Mojang but only after their data has been migrated to the new name.

      Parameters:
      lastKnownName - the last known name for the player.
    • getLastWorld

      public String getLastWorld()
      Returns the name of last world the player was in.
      Returns:
      The last world the player was in or null if not set.
    • setLastWorld

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setLastWorld(String world)
      Sets the last world the player was known to be in. This is done automatically on world change.
      Parameters:
      world - The world the player is in.
    • shouldLoadOnLogin

      public boolean shouldLoadOnLogin()
      Says whether the player data for the player's logout world should be loaded when the player logs in. The default value is false.
      Returns:
      true if player data should be loaded when they log in.
    • setLoadOnLogin

      public org.mvplugins.multiverse.external.vavr.control.Try<Void> setLoadOnLogin(boolean loadOnLogin)
      Sets whether the player data for the player's logout world should be loaded when the player logs in.
      Parameters:
      loadOnLogin - true if player data should be loaded when they log in.
    • toString

      public String toString()
      Overrides:
      toString in class Object