Class WbsPlayerUtil

java.lang.Object
wbs.utils.util.entities.WbsPlayerUtil

public final class WbsPlayerUtil extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    getExp(org.bukkit.entity.Player player)
    Retrieved from https://github.com/EssentialsX/Essentials/blob/1e0d7fb0a3545d15c3b0cc1d180b47551f98cb22/Essentials/src/main/java/com/earth2me/essentials/craftbukkit/SetExpFix.java on 25-07-21
    static int
    getExpAtLevel(int level)
    Calculation for experience internally.
    static org.bukkit.Location
    getNeckPosition(org.bukkit.entity.Player player)
    Returns the location at which the head pivots.
    static float
    getProgressForExp(int points)
     
    static void
    setExp(org.bukkit.entity.Player player, int points)
    Set the total experience of a player safely and based on points
    static float
    toLevels(int points)
    Gets the amount of levels for the given amount of points, where the whole number part is the level, and the decimal is the progress to the next level.

    Methods inherited from class java.lang.Object

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

    • getNeckPosition

      public static org.bukkit.Location getNeckPosition(org.bukkit.entity.Player player)
      Returns the location at which the head pivots. Useful for getting relative coordinates to the head using facing vector.
      Parameters:
      player - The player whose neck pos to get
      Returns:
      The neck position
    • setExp

      public static void setExp(org.bukkit.entity.Player player, int points)
      Set the total experience of a player safely and based on points
      Parameters:
      player - The player to set the exp for
      points - The new experience
    • toLevels

      public static float toLevels(int points)
      Gets the amount of levels for the given amount of points, where the whole number part is the level, and the decimal is the progress to the next level.
      Parameters:
      points - The points to find the level for
      Returns:
      The level
    • getProgressForExp

      public static float getProgressForExp(int points)
    • getExp

      public static int getExp(org.bukkit.entity.Player player)
      Retrieved from https://github.com/EssentialsX/Essentials/blob/1e0d7fb0a3545d15c3b0cc1d180b47551f98cb22/Essentials/src/main/java/com/earth2me/essentials/craftbukkit/SetExpFix.java on 25-07-21
      Returns:
      Gets the actual experience of the player
    • getExpAtLevel

      public static int getExpAtLevel(int level)
      Calculation for experience internally. Retrieved from https://github.com/EssentialsX/Essentials/blob/1e0d7fb0a3545d15c3b0cc1d180b47551f98cb22/Essentials/src/main/java/com/earth2me/essentials/craftbukkit/SetExpFix.java on 25-07-21