mirror of
https://github.com/HibiscusMC/HibiscusCommons.git
synced 2025-12-19 15:09:26 +00:00
feat: latest packet wrappers
This commit is contained in:
@@ -32,12 +32,12 @@ public interface PacketInterface {
|
||||
// Override
|
||||
}
|
||||
|
||||
default PacketAction readPlayerArm(@NotNull Player player) {
|
||||
default PacketAction readPlayerArm(@NotNull Player player, @NotNull PlayerSwingWrapper wrapper) {
|
||||
return PacketAction.NOTHING;
|
||||
// Override
|
||||
}
|
||||
|
||||
default PacketAction readEntityHandle(@NotNull Player player) {
|
||||
default PacketAction readEntityHandle(@NotNull Player player, @NotNull PlayerInteractWrapper wrapper) {
|
||||
return PacketAction.NOTHING;
|
||||
// Override
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package me.lojosho.hibiscuscommons.packets.wrapper;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@Getter @Setter
|
||||
public class PlayerActionWrapper {
|
||||
|
||||
private String actionType;
|
||||
@Getter
|
||||
private final String actionType;
|
||||
|
||||
public PlayerActionWrapper(String actionType) {
|
||||
public PlayerActionWrapper(@NotNull String actionType) {
|
||||
this.actionType = actionType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package me.lojosho.hibiscuscommons.packets.wrapper;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
public class PlayerInteractWrapper {
|
||||
|
||||
@Getter
|
||||
private final int entityId;
|
||||
|
||||
public PlayerInteractWrapper(int entityId) {
|
||||
this.entityId = entityId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package me.lojosho.hibiscuscommons.packets.wrapper;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PlayerSwingWrapper {
|
||||
|
||||
@Getter
|
||||
private final String hand;
|
||||
|
||||
public PlayerSwingWrapper(@NotNull String hand) {
|
||||
this.hand = hand;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user