java.lang.Object
me.gigawartrex.smalladditions.helpers.Helper

public class Helper extends Object
Class housing all sorts of helpers for ingame Minecraft operations.
Author:
Paul Ferlitz
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 number
      max - 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 edited
      x - the X offset
      y - the Y offset
      z - the Z offset
      Returns:
      the new Location