From f3f46168131845791ca1139a19d8efe7ec76090a Mon Sep 17 00:00:00 2001 From: otDan Date: Wed, 13 Nov 2024 17:20:32 +0100 Subject: [PATCH] feat: Pointless stuff --- .idea/vcs.xml | 6 ++++++ pom.xml | 2 +- spigot/pom.xml | 2 +- .../me/zimzaza4/geyserutils/spigot/api/EntityUtils.java | 3 ++- .../me/zimzaza4/geyserutils/spigot/api/PlayerUtils.java | 5 ++++- 5 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9dadb1d..f265b27 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.zimzaza4 GeyserUtils - 1.0-SNAPSHOT + 1.0-SNAPSHOT-${commit.short} pom common diff --git a/spigot/pom.xml b/spigot/pom.xml index 80b7ec0..6eaab2c 100644 --- a/spigot/pom.xml +++ b/spigot/pom.xml @@ -6,7 +6,7 @@ me.zimzaza4 geyserutils-spigot - 1.0-SNAPSHOT + 1.1 jar geyserutils-spigot diff --git a/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/EntityUtils.java b/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/EntityUtils.java index 492ba09..c1ea4f1 100644 --- a/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/EntityUtils.java +++ b/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/EntityUtils.java @@ -7,6 +7,7 @@ import org.bukkit.entity.Player; import java.awt.*; +import java.util.ArrayList; import java.util.Map; public class EntityUtils { @@ -44,7 +45,6 @@ public static void sendVariant(Player player, int id, int variant) { } - public static void setCustomEntity(Player player, int entityId, String def) { CustomEntityPacket packet = new CustomEntityPacket(entityId, def); player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet)); @@ -126,4 +126,5 @@ public static void sendIntProperties(Player player, int id, Map player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet)); } + } diff --git a/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/PlayerUtils.java b/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/PlayerUtils.java index 2d9695d..e0d2c58 100644 --- a/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/PlayerUtils.java +++ b/spigot/src/main/java/me/zimzaza4/geyserutils/spigot/api/PlayerUtils.java @@ -24,6 +24,10 @@ public static void shakeCamera(Player player, float intensity, float duration, i player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(new CameraShakeCustomPayloadPacket(intensity, duration, type))); } + public static void playEntityAnimation(Player player, Animation animation, Integer entityId) { + playEntityAnimation(player, animation, new ArrayList<>(entityId)); + } + public static void playEntityAnimation(Player player, Animation animation, Entity... entityList) { List idList = new ArrayList<>(); for (Entity entity : entityList) { @@ -38,7 +42,6 @@ public static void playEntityAnimation(Player player, Animation animation, List< packet.parseFromAnimation(animation); packet.setEntityJavaIds(entityList); player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet)); - } public static void sendCameraInstruction(Player player, Instruction instruction) {