Class GEOResourceGenerationEvent

java.lang.Object
org.bukkit.event.Event
io.github.thebusybiscuit.slimefun4.api.events.GEOResourceGenerationEvent

public class GEOResourceGenerationEvent extends Event
This Event is fired whenever a GEOResource is being freshly generated. This only occurs when a GEOScanner queries the Chunk for a GEOResource but cannot find it. You can modify this Event by listening to it.
Author:
TheBusyBiscuit
See Also:
  • Constructor Details

    • GEOResourceGenerationEvent

      @ParametersAreNonnullByDefault public GEOResourceGenerationEvent(World world, Biome biome, int x, int z, GEOResource resource, int value)
  • Method Details

    • getValue

      public int getValue()
      This returns the amount that will be generated of this GEOResource.
      Returns:
      The value aka the supply of this GEOResource to generate
    • setValue

      public void setValue(int value)
      This modifies the amount that will be generated.
      Parameters:
      value - The new supply for this GEOResource
    • getWorld

      @Nonnull public World getWorld()
      This returns the World in which this event takes place.
      Returns:
      The affected World
    • getResource

      @Nonnull public GEOResource getResource()
      This method returns the GEOResource that is being generated
      Returns:
      The generated GEOResource
    • getChunkX

      public int getChunkX()
      This returns the X coordinate of the Chunk in which the GEOResource is generated.
      Returns:
      The x value of this Chunk
    • getChunkZ

      public int getChunkZ()
      This returns the Z coordinate of the Chunk in which the GEOResource is generated.
      Returns:
      The z value of this Chunk
    • getEnvironment

      @Nonnull public World.Environment getEnvironment()
      This method returns the World.Environment in which the resource is generated. It is equivalent to WorldInfo.getEnvironment().
      Returns:
      The World.Environment of this generation
    • getBiome

      @Nonnull public Biome getBiome()
      This returns the Biome at the Location at which the GEOResource is generated.
      Returns:
      The Biome of this generation
    • getHandlerList

      public static HandlerList getHandlerList()
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event