Class PlayerUtil

java.lang.Object
net.lewmc.essence.utils.PlayerUtil

public class PlayerUtil extends Object
Essence's player utility.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerUtil(Essence plugin, org.bukkit.command.CommandSender cs)
    The Player utility.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlayerUtil

      public PlayerUtil(Essence plugin, org.bukkit.command.CommandSender cs)
      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.