public interface User
extends jskills.IPlayer, jskills.ISupportPartialPlay, jskills.ISupportPartialUpdate
Modifier and Type | Method and Description |
---|---|
void |
addListeningChannel(java.lang.String channel)
Add the user to a new channel
|
void |
applyRolePrefix()
Applies the default prefix of the role, if there is one
|
void |
applyRoleSuffix()
Applies the default suffix of the role, if there is one
|
ChatChannel |
getActiveChannel()
Get the user's active channel
|
java.util.List<ChatChannel> |
getChannels() |
net.kyori.text.Component |
getDisplayName()
returns the display name of the user, consists of prefix, raw display name and suffix.
|
Locale |
getLocale() |
org.bukkit.entity.Player |
getPlayer() |
int |
getPoint(GameMode gameMode,
java.lang.String pointId)
Get the value of a point
|
java.util.Map<GameMode,java.util.Map<java.lang.String,java.lang.Integer>> |
getPoints() |
java.util.Map<java.lang.String,java.lang.Integer> |
getPoints(GameMode gameMode) |
net.kyori.text.Component |
getPrefix() |
jskills.Rating |
getRating(GameMode mode) |
java.util.Map<java.lang.String,RatingWrapper> |
getRatings() |
java.lang.String |
getRawDisplayName()
returns the display name of the user
|
Role |
getRole() |
net.kyori.text.Component |
getSuffix() |
UserData |
getUserData() |
java.util.UUID |
getUuid() |
boolean |
hasPermission(Permission perm)
checks if that user has the desired permission.
|
boolean |
isLeaving() |
void |
refreshDisplayName()
Causes a new display name to be generated, based on the raw display name, prefix and suffix
|
void |
removeListeningChannel(java.lang.String channel)
Remove the user from a channel
|
void |
saveRating(GameMode mode,
jskills.Rating rating)
Saves a rating for this users.
|
void |
sendMessage(net.kyori.text.Component message)
Send a message to this user.
|
void |
setActiveChannel(java.lang.String channel)
Set a user's active channel
|
void |
setDisplayName(java.lang.String displayName)
sets the raw display name for this user
|
void |
setLeaving(boolean leaving)
Deprecated.
should only be used internally
|
void |
setLocale(Locale locale)
sets the players locale.
|
void |
setPlayer(org.bukkit.entity.Player player)
sets the player object for this user
|
void |
setPoint(GameMode gameMode,
java.lang.String pointId,
int value)
Set the value of a point
|
void |
setPrefix(net.kyori.text.Component prefix)
changes the prefix for this user.
|
void |
setRole(Role role)
changes the role of the user
|
void |
setSuffix(net.kyori.text.Component suffix)
changes the suffix for this user.
|
void |
setUserData(UserData userData)
Sets the userdata for this user
|
void |
setUuid(java.util.UUID uuid)
sets the uuid of this user.
|
@Nonnull java.util.UUID getUuid()
void sendMessage(@Nonnull net.kyori.text.Component message)
message
- the message to be sendboolean hasPermission(@Nonnull Permission perm)
perm
- the permission object to check@Nonnull net.kyori.text.Component getDisplayName()
void setDisplayName(@Nonnull java.lang.String displayName)
displayName
- the raw display name@Nonnull java.lang.String getRawDisplayName()
@Nonnull org.bukkit.entity.Player getPlayer()
void setPlayer(@Nonnull org.bukkit.entity.Player player)
player
- the new player object@Nonnull Locale getLocale()
void setLocale(@Nonnull Locale locale)
locale
- the new locale@Nonnull Role getRole()
void setRole(@Nonnull Role role)
role
- the new role@Nonnull jskills.Rating getRating(@Nonnull GameMode mode)
mode
- the mode to get the rating forvoid saveRating(@Nonnull GameMode mode, @Nonnull jskills.Rating rating)
mode
- the mode the rating was achieved inrating
- the new ratingvoid refreshDisplayName()
@Nonnull java.util.Map<java.lang.String,RatingWrapper> getRatings()
java.util.Map<GameMode,java.util.Map<java.lang.String,java.lang.Integer>> getPoints()
java.util.Map<java.lang.String,java.lang.Integer> getPoints(GameMode gameMode)
int getPoint(GameMode gameMode, java.lang.String pointId)
gameMode
- gamemode the point applies forpointId
- the point namevoid setPoint(GameMode gameMode, java.lang.String pointId, int value)
gameMode
- gamemode the point applies forpointId
- the point namevalue
- the new value to set@Nonnull net.kyori.text.Component getPrefix()
void setPrefix(@Nonnull net.kyori.text.Component prefix)
prefix
- the new prefix@Nonnull net.kyori.text.Component getSuffix()
void setSuffix(@Nonnull net.kyori.text.Component suffix)
suffix
- the new suffixvoid setUuid(@Nonnull java.util.UUID uuid)
uuid
- the new uuid@Nonnull java.util.List<ChatChannel> getChannels()
void addListeningChannel(@Nonnull java.lang.String channel)
channel
- string identifier for the channelvoid removeListeningChannel(@Nonnull java.lang.String channel)
channel
- string identifier for the channel@Nonnull ChatChannel getActiveChannel()
void setActiveChannel(@Nonnull java.lang.String channel)
channel
- string identifier for the channelvoid applyRolePrefix()
void applyRoleSuffix()
UserData getUserData()
void setUserData(UserData userData)
userData
- the new data to setboolean isLeaving()
@Deprecated void setLeaving(boolean leaving)
leaving
- if the player is leaving