Package net.lewmc.essence.utils
Class PlayerUtil
java.lang.Object
net.lewmc.essence.utils.PlayerUtil
Essence's player utility.
-
Constructor Summary
ConstructorDescriptionPlayerUtil
(Essence plugin, org.bukkit.command.CommandSender cs) The Player utility. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Creates a player data file for the given player.boolean
setGamemode
(org.bukkit.command.CommandSender cs, org.bukkit.entity.Player player, org.bukkit.GameMode gamemode) Sets the player's gamemode.boolean
Updates a player data file for the given player.boolean
updatePlayerData
(boolean acceptingTeleportRequests, double balance, boolean acceptingPayments) Updates a player data file for the given player.
-
Constructor Details
-
PlayerUtil
The Player utility.- Parameters:
plugin
- Reference to the main Essence class.cs
- CommandSender - The user who sent the command.
-
-
Method Details
-
setGamemode
public boolean setGamemode(org.bukkit.command.CommandSender cs, org.bukkit.entity.Player player, org.bukkit.GameMode gamemode) Sets the player's gamemode.- Parameters:
cs
- CommandSender - The executor of the command.player
- Player - The target player (might be self).gamemode
- GameMode - The gamemode to set the player to.- Returns:
- boolean - Success
-
createPlayerData
public boolean createPlayerData()Creates a player data file for the given player.- Returns:
- boolean - If the operation was successful.
-
updatePlayerData
public boolean updatePlayerData(boolean acceptingTeleportRequests, double balance, boolean acceptingPayments) Updates a player data file for the given player.- Returns:
- boolean - If the operation was successful.
-
updatePlayerData
public boolean updatePlayerData()Updates a player data file for the given player.- Returns:
- boolean - If the operation was successful.
-