Klasse PlayerHitTerrainEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.world.PlayerWorldEditEvent
net.risingworld.api.events.player.world.PlayerHitTerrainEvent
- Alle implementierten Schnittstellen:
Cancellable
Called when a player hits terrain with a tool (e.g pickaxe).
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungshort
Gets the amount of damage the player deals with this hit.Gets the world coordinates where the terrain was hit exactly.void
setDamage
(short damage) Sets the amount of damage the player should inflict with this hit.Von Klasse geerbte Methoden net.risingworld.api.events.player.world.PlayerWorldEditEvent
getBlockPositionX, getBlockPositionY, getBlockPositionZ, getChunkPositionX, getChunkPositionY, getChunkPositionZ, isCancelled, setCancelled
Von Klasse geerbte Methoden net.risingworld.api.events.player.PlayerEvent
getPlayer
-
Methodendetails
-
getDamage
public short getDamage()Gets the amount of damage the player deals with this hit. To destroy terrain, the total damage must exceed a threshold of 100.- Gibt zurück:
- the amount of damage.
-
setDamage
public void setDamage(short damage) Sets the amount of damage the player should inflict with this hit. To destroy terrain, the total damage must exceed a threshold of 100.- Parameter:
damage
- the new amount of damage.
-
getHitPosition
Gets the world coordinates where the terrain was hit exactly.- Gibt zurück:
- coordinates where the terrain was hit.
-