Class PlayerVehicleStorageAccessEvent
java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.PlayerVehicleEvent
net.risingworld.api.events.player.PlayerVehicleStorageAccessEvent
- All Implemented Interfaces:
Cancellable
public final class PlayerVehicleStorageAccessEvent
extends PlayerVehicleEvent
implements Cancellable
Called when a player accesses a storage which is attached to a vehicle (e.g the storage of a boat).
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the related storage object.longGets the storage ID of the vehicle storage.Gets the vehicle the storage is attached to.boolean/////////////////////////////////////////////////////////////////////////voidsetCancelled(boolean cancel) Cancels this event.Methods inherited from class PlayerEvent
getPlayer
-
Method Details
-
getVehicle
Gets the vehicle the storage is attached to. Note that the vehicle might be null, e.g if the related vehicle could not be found.- Overrides:
getVehiclein classPlayerVehicleEvent- Returns:
- the vehicle (or null if the related vehicle no longer exists).
-
getStorageID
public long getStorageID()Gets the storage ID of the vehicle storage.- Returns:
- the global storage ID.
-
getStorage
Gets the related storage object.- Returns:
- the storage object (representing the vehicle storage).
-
isCancelled
public boolean isCancelled()/////////////////////////////////////////////////////////////////////////- Specified by:
isCancelledin interfaceCancellable- Returns:
- true if the event is cancelled, or false if not.
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableCancels this event. This means it will no longer be executed, but other plugins will still receive the event.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel- set to true if you want to cancel this event.
-