Package com.github.mafelp.accounts
Class Account
java.lang.Object
com.github.mafelp.accounts.Account
The method that stores all necessary information about an account with linked discord user and
minecraft player.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringThe tag used to mention a DiscordUserin a discord message.private org.bukkit.OfflinePlayerThe minecraftOfflinePlayerto link the discordUserto.private UUIDThe UUID of the minecraftplayer.private org.javacord.api.entity.user.UserThe discord userprivate longthe discord ID of theuser.private StringThe name of the account. -
Constructor Summary
ConstructorsConstructorDescriptionAccount(org.javacord.api.entity.user.User user, org.bukkit.OfflinePlayer player)The constructor to create an account from a minecraftplayerUUIDand a discorduserID. -
Method Summary
Modifier and TypeMethodDescriptiongetByDiscordUser(org.javacord.api.entity.user.User user)The method to get anAccountby theUserit belongs to.getByPlayer(org.bukkit.OfflinePlayer player)The method to get anAccountby theOfflinePlayerit belongs to.getByUsername(String username)The getter for thementionTag.org.bukkit.OfflinePlayerThe getter for theplayer.The getter for theplayerUUID.org.javacord.api.entity.user.UsergetUser()The getter for theuser.longThe getter for theuserID.The getter for theusername.setUsername(String username)The setter for theusername.
-
Field Details
-
user
private final org.javacord.api.entity.user.User userThe discord user -
userID
private final long userIDthe discord ID of theuser. -
username
The name of the account. The default is the discord name of theuser. -
mentionTag
The tag used to mention a DiscordUserin a discord message. -
player
private final org.bukkit.OfflinePlayer playerThe minecraftOfflinePlayerto link the discordUserto. -
playerUUID
The UUID of the minecraftplayer.
-
-
Constructor Details
-
Account
public Account(org.javacord.api.entity.user.User user, org.bukkit.OfflinePlayer player)The constructor to create an account from a minecraftplayerUUIDand a discorduserID.- Parameters:
user- The discordUserto link this account to.player- The minecraftPlayerto link this account to.
-
-
Method Details
-
getUser
public org.javacord.api.entity.user.User getUser()The getter for theuser.- Returns:
- The
userfield.
-
getUserID
public long getUserID()The getter for theuserID.- Returns:
- The
userIDfield.
-
getUsername
The getter for theusername.- Returns:
- The
usernamefield.
-
setUsername
The setter for theusername.- Parameters:
username- the username to set.- Returns:
- The
usernamefield.
-
getMentionTag
The getter for thementionTag.- Returns:
- The
mentionTagfield.
-
getPlayer
public org.bukkit.OfflinePlayer getPlayer()The getter for theplayer.- Returns:
- The
playerfield.
-
getPlayerUUID
The getter for theplayerUUID.- Returns:
- The
playerUUIDfield.
-
getByPlayer
The method to get anAccountby theOfflinePlayerit belongs to. -
getByDiscordUser
The method to get anAccountby theUserit belongs to. -
getByUsername
-