Class ReceivePlayerInputPacketEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
moe.caramel.daydream.event.packet.ReceivePacketEvent
moe.caramel.daydream.event.packet.ReceivePlayerInputPacketEvent
- All Implemented Interfaces:
Cancellable
@NullMarked
public final class ReceivePlayerInputPacketEvent
extends ReceivePacketEvent
implements Cancellable
서버가 클라이언트로부터
PacketType.Client.PLAYER_INPUT
패킷을 전달받았을 때 호출됩니다.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionReceivePlayerInputPacketEvent
(Player who, float sideways, float forward, boolean jumping, boolean shiftKeyDown) -
Method Summary
Modifier and TypeMethodDescriptionfloat
Gets forward value.float
Gets sideways value.boolean
Gets the cancellation state of this event.boolean
Gets jumping value.boolean
Gets shiftKeyDown value.void
setCancelled
(boolean cancel) Sets the cancellation state of this event.void
setForward
(float forward) Sets forward value.void
setJumping
(boolean jumping) Sets jumping value.void
setShiftKeyDown
(boolean shiftKeyDown) Sets shiftKeyDown value.void
setSideways
(float sideways) Sets sideways value.toString()
Methods inherited from class moe.caramel.daydream.event.packet.ReceivePacketEvent
getHandlerList, getHandlers, getPacketType
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
callEvent, getEventMetadata, getEventName, isAsynchronous, isSupportInterrupt
-
Constructor Details
-
ReceivePlayerInputPacketEvent
-
-
Method Details
-
getSideways
public float getSideways()Gets sideways value.- Returns:
- sideways value
-
setSideways
public void setSideways(float sideways) Sets sideways value.- Parameters:
sideways
- new sideways value
-
getForward
public float getForward()Gets forward value.- Returns:
- forward value
-
setForward
public void setForward(float forward) Sets forward value.- Parameters:
forward
- new forward value
-
isJumping
public boolean isJumping()Gets jumping value.- Returns:
- jumping value
-
setJumping
public void setJumping(boolean jumping) Sets jumping value.- Parameters:
jumping
- new jumping value
-
isShiftKeyDown
public boolean isShiftKeyDown()Gets shiftKeyDown value.- Returns:
- shiftKeyDown value
-
setShiftKeyDown
public void setShiftKeyDown(boolean shiftKeyDown) Sets shiftKeyDown value.- Parameters:
shiftKeyDown
- new shiftKeyDown value
-
isCancelled
public boolean isCancelled()Description copied from interface:Cancellable
Gets 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:
isCancelled
in interfaceCancellable
- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:Cancellable
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 interfaceCancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
toString
-