Class Helper
java.lang.Object
me.gigawartrex.smalladditions.helpers.Helper
Class housing all sorts of helpers for ingame Minecraft operations.
- Author:
- Paul Ferlitz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.Location
getLocation
(org.bukkit.Location loc, int x, int y, int z) Offsets the given location by the entered values.static int
randNumFromRange
(int min, int max) Generates a random number inclusive between min and max.
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
randNumFromRange
public static int randNumFromRange(int min, int max) Generates a random number inclusive between min and max.- Parameters:
min
- the smallest possible numbermax
- the biggest possible number- Returns:
- the pseudo randomly generated number
-
getLocation
public static org.bukkit.Location getLocation(org.bukkit.Location loc, int x, int y, int z) Offsets the given location by the entered values.- Parameters:
loc
- the original location to be editedx
- the X offsety
- the Y offsetz
- the Z offset- Returns:
- the new Location
-