Interface SharableHandler<T>

Type Parameters:
T - The type of data the Sharable this belongs to represents.

public interface SharableHandler<T>
This class is used to handle the transition of data from a player profile to a player and vice versa, typically when changing worlds.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    updatePlayer(org.bukkit.entity.Player player, ProfileData profile)
    This method is called during share handling (aka PlayerChangeWorldEvent).
    void
    updateProfile(ProfileData profile, org.bukkit.entity.Player player)
    This method is called during share handling (aka PlayerChangeWorldEvent).
  • Method Details

    • updateProfile

      void updateProfile(ProfileData profile, org.bukkit.entity.Player player)
      This method is called during share handling (aka PlayerChangeWorldEvent). It will perform updates to the PlayerProfile based on the data contained in the Player
      Parameters:
      profile - Updates the data of this profile according to the Sharable with the values of the player.
      player - The player whose values will be used to update the given profile.
    • updatePlayer

      boolean updatePlayer(org.bukkit.entity.Player player, ProfileData profile)
      This method is called during share handling (aka PlayerChangeWorldEvent). It will perform updates to the Player based on the data contained in the PlayerProfile
      Parameters:
      player - Updates the data of this player according to the Sharable with the values of the given profile.
      profile - The profile whose values will be used to update the give player.
      Returns:
      True if player was updated from existing profile. False if default was used (new profile).