Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.zimzaza4</groupId>
<artifactId>GeyserUtils</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.0-SNAPSHOT-${commit.short}</version>
<packaging>pom</packaging>
<modules>
<module>common</module>
Expand Down
2 changes: 1 addition & 1 deletion spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.zimzaza4</groupId>
<artifactId>geyserutils-spigot</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1</version>
<packaging>jar</packaging>

<name>geyserutils-spigot</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.bukkit.entity.Player;

import java.awt.*;
import java.util.ArrayList;
import java.util.Map;

public class EntityUtils {
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -126,4 +126,5 @@ public static void sendIntProperties(Player player, int id, Map<String, Integer>

player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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<Integer> idList = new ArrayList<>();
for (Entity entity : entityList) {
Expand All @@ -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) {
Expand Down