Interface SharableHandler<T>
- Type Parameters:
T- The type of data theSharablethis 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 TypeMethodDescriptionbooleanupdatePlayer(org.bukkit.entity.Player player, ProfileData profile) This method is called during share handling (aka PlayerChangeWorldEvent).voidupdateProfile(ProfileData profile, org.bukkit.entity.Player player) This method is called during share handling (aka PlayerChangeWorldEvent).
-
Method Details
-
updateProfile
This method is called during share handling (aka PlayerChangeWorldEvent). It will perform updates to thePlayerProfilebased on the data contained in thePlayer- 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
This method is called during share handling (aka PlayerChangeWorldEvent). It will perform updates to thePlayerbased on the data contained in thePlayerProfile- 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).
-