Klasse PlayerHitObjectEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.world.PlayerObjectEvent
net.risingworld.api.events.player.world.PlayerHitObjectEvent
- Alle implementierten Schnittstellen:
Cancellable
Called when a player hits an object (e.g furniture, doors, lamps etc).
Example: Destroy object after a single hit
- Siehe auch:
-
Feldübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungshort
Gets the amount of damage the player causes by hitting the object.Gets the world coordinates where the object was hit exactly.Gets the object element.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.PlayerObjectEvent
getChunkPositionX, getChunkPositionY, getChunkPositionZ, getGlobalID, getObjectDefinition, getTypeID, 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 causes by hitting the object.- Gibt zurück:
- the amount of damage dealt with this hit.
-
setDamage
public void setDamage(short damage) Sets the amount of damage the player should inflict with this hit.- Parameter:
damage
- the new amount of damage.
-
getHitPosition
Gets the world coordinates where the object was hit exactly.- Gibt zurück:
- coordinates where the object was hit.
-
getObject
Beschreibung aus Klasse kopiert:PlayerObjectEvent
Gets the object element.- Setzt außer Kraft:
getObject
in KlassePlayerObjectEvent
- Gibt zurück:
- the object element.
-