Package wbs.utils.util.entities
Class WbsPlayerUtil
java.lang.Object
wbs.utils.util.entities.WbsPlayerUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic intgetExp(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-21static intgetExpAtLevel(int level) Calculation for experience internally.static org.bukkit.LocationgetNeckPosition(org.bukkit.entity.Player player) Returns the location at which the head pivots.static floatgetProgressForExp(int points) static voidsetExp(org.bukkit.entity.Player player, int points) Set the total experience of a player safely and based on pointsstatic floattoLevels(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.
-
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 forpoints- 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
-