Class GEOResourceGenerationEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- io.github.thebusybiscuit.slimefun4.api.events.GEOResourceGenerationEvent
-
public class GEOResourceGenerationEvent extends Event
ThisEvent
is fired whenever aGEOResource
is being freshly generated. This only ocurs when aGEOScanner
queries theChunk
for aGEOResource
but cannot find it. You can modify thisEvent
by listening to it.- Author:
- TheBusyBiscuit
- See Also:
ResourceManager
,GEOResource
,GEOScanner
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Constructor Summary
Constructors Constructor Description GEOResourceGenerationEvent(World world, Biome biome, int x, int z, GEOResource resource, int value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Biome
getBiome()
int
getChunkX()
This returns the X coordinate of theChunk
in which theGEOResource
is generated.int
getChunkZ()
This returns the Z coordinate of theChunk
in which theGEOResource
is generated.World.Environment
getEnvironment()
This method returns theWorld.Environment
in which the resource is generated.static HandlerList
getHandlerList()
HandlerList
getHandlers()
GEOResource
getResource()
This method returns theGEOResource
that is being generatedint
getValue()
This returns the amount that will be generated of thisGEOResource
.World
getWorld()
This returns theWorld
in which this event takes place.void
setValue(int value)
This modifies the amount that will be generated.-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
GEOResourceGenerationEvent
public GEOResourceGenerationEvent(World world, Biome biome, int x, int z, GEOResource resource, int value)
-
-
Method Detail
-
getValue
public int getValue()
This returns the amount that will be generated of thisGEOResource
.- 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 thisGEOResource
-
getWorld
public World getWorld()
This returns theWorld
in which this event takes place.- Returns:
- The affected
World
-
getResource
public GEOResource getResource()
This method returns theGEOResource
that is being generated- Returns:
- The generated
GEOResource
-
getChunkX
public int getChunkX()
This returns the X coordinate of theChunk
in which theGEOResource
is generated.- Returns:
- The x value of this
Chunk
-
getChunkZ
public int getChunkZ()
This returns the Z coordinate of theChunk
in which theGEOResource
is generated.- Returns:
- The z value of this
Chunk
-
getEnvironment
public World.Environment getEnvironment()
This method returns theWorld.Environment
in which the resource is generated. It is equivalent toWorld.getEnvironment()
.- Returns:
- The
World.Environment
of this generation
-
getHandlers
public HandlerList getHandlers()
- Specified by:
getHandlers
in classEvent
-
getHandlerList
public static HandlerList getHandlerList()
-
-