Package nl.mtvehicles.core.events
Class JerryCanClickEvent
java.lang.Object
org.bukkit.event.Event
nl.mtvehicles.core.infrastructure.models.MTVEvent
nl.mtvehicles.core.events.JerryCanClickEvent
- All Implemented Interfaces:
HasJerryCan
,IsCancellable
On right click with a jerry can - its refuelling (the gas stations feature)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get current fuel in the jerry can (before the event is executed)int
Get the size of the jerry can (in litres)void
setCancelled(boolean cancelled)
Sets the cancellation state of this event.Methods inherited from class nl.mtvehicles.core.infrastructure.models.MTVEvent
call, getHandlerList, getHandlers, getPlayer, isCancelled, setPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
JerryCanClickEvent
public JerryCanClickEvent(int jerryCanFuel, int jerryCanSize)
-
-
Method Details
-
setCancelled
public void setCancelled(boolean cancelled)Description copied from interface:IsCancellable
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelled
in interfaceIsCancellable
- Parameters:
cancelled
- true if you wish to cancel this event
-
getJerryCanFuel
public int getJerryCanFuel()Description copied from interface:HasJerryCan
Get current fuel in the jerry can (before the event is executed)- Specified by:
getJerryCanFuel
in interfaceHasJerryCan
- Returns:
- Current fuel in the jerry can
-
getJerryCanSize
public int getJerryCanSize()Description copied from interface:HasJerryCan
Get the size of the jerry can (in litres)- Specified by:
getJerryCanSize
in interfaceHasJerryCan
- Returns:
- Size of the jerry can
-