9
0
mirror of https://github.com/GeyserExtensionists/GeyserUtils.git synced 2025-12-19 15:09:24 +00:00
This commit is contained in:
zimzaza4
2024-07-07 18:48:21 +08:00
parent dc75e10790
commit 2fb33bc350
5 changed files with 4 additions and 92 deletions

View File

@@ -94,13 +94,10 @@ public class PlayerUtils {
}
public static void sendEntityScoreUpdate(Player player, Entity entity, String objective, int score) {
UpdateEntityScorePacket packet = new UpdateEntityScorePacket(entity.getEntityId(), objective, score);
player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet));
}
// (yes I'm aware it's "horrible" code), also this aint player packets at all lmao
// right, so this part needs to be refactored xD
// the plugin didn't have this much functionality in its earliest days (it even just have camera shakes),
// so I didn't think too much about it
public static void registerProperty(Player player, Entity entity, String identifier, Class<?> type) {
EntityPropertyRegisterPacket packet = new EntityPropertyRegisterPacket();