Class GEOResourceGenerationEvent
java.lang.Object
org.bukkit.event.Event
io.github.thebusybiscuit.slimefun4.api.events.GEOResourceGenerationEvent
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionGEOResourceGenerationEvent(World world, Biome biome, int x, int z, GEOResource resource, int value) -
Method Summary
Modifier and TypeMethodDescriptiongetBiome()intThis returns the X coordinate of theChunkin which theGEOResourceis generated.intThis returns the Z coordinate of theChunkin which theGEOResourceis generated.This method returns theWorld.Environmentin which the resource is generated.static HandlerListThis method returns theGEOResourcethat is being generatedintgetValue()This returns the amount that will be generated of thisGEOResource.getWorld()This returns theWorldin which this event takes place.voidsetValue(int value) This modifies the amount that will be generated.Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
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 thisGEOResource.- Returns:
- The value aka the supply of this
GEOResourceto generate
-
setValue
public void setValue(int value) This modifies the amount that will be generated.- Parameters:
value- The new supply for thisGEOResource
-
getWorld
This returns theWorldin which this event takes place.- Returns:
- The affected
World
-
getResource
This method returns theGEOResourcethat is being generated- Returns:
- The generated
GEOResource
-
getChunkX
public int getChunkX()This returns the X coordinate of theChunkin which theGEOResourceis generated.- Returns:
- The x value of this
Chunk
-
getChunkZ
public int getChunkZ()This returns the Z coordinate of theChunkin which theGEOResourceis generated.- Returns:
- The z value of this
Chunk
-
getEnvironment
This method returns theWorld.Environmentin which the resource is generated. It is equivalent toWorldInfo.getEnvironment().- Returns:
- The
World.Environmentof this generation
-
getBiome
- Returns:
- The
Biomeof this generation
-
getHandlerList
-
getHandlers
- Specified by:
getHandlersin classEvent
-