Package noppes.npcs.api.handler
Interface IProfileHandler
-
public interface IProfileHandlerManages player profiles, which allow players to have multiple save slots for their CNPC+ data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanchangeSlot(IPlayer player, int slotID)Switches the player to a different profile slot.IProfilegetProfile(IPlayer player)Returns the profile for the given player.IPlayerDatagetSlotPlayerData(IPlayer player, int slotID)Returns the player data for a specific profile slot without switching to it.booleanhasSlot(IPlayer player, int slotID)Checks whether a profile slot exists for the player.booleanremoveSlot(IPlayer player, int slotID)Removes a profile slot from the player.voidsaveSlotData(IPlayer player)Saves the current slot data for the player.
-
-
-
Method Detail
-
getProfile
IProfile getProfile(IPlayer player)
Returns the profile for the given player.- Parameters:
player- the player.- Returns:
- the player's profile.
-
changeSlot
boolean changeSlot(IPlayer player, int slotID)
Switches the player to a different profile slot.- Parameters:
player- the player.slotID- the slot ID to switch to.- Returns:
- true if the switch was successful.
-
hasSlot
boolean hasSlot(IPlayer player, int slotID)
Checks whether a profile slot exists for the player.- Parameters:
player- the player.slotID- the slot ID.- Returns:
- true if the slot exists.
-
removeSlot
boolean removeSlot(IPlayer player, int slotID)
Removes a profile slot from the player.- Parameters:
player- the player.slotID- the slot ID to remove.- Returns:
- true if the slot was removed.
-
getSlotPlayerData
IPlayerData getSlotPlayerData(IPlayer player, int slotID)
Returns the player data for a specific profile slot without switching to it.- Parameters:
player- the player.slotID- the slot ID.- Returns:
- the player data for the slot.
-
saveSlotData
void saveSlotData(IPlayer player)
Saves the current slot data for the player.- Parameters:
player- the player.
-
-