This commit is contained in:
zimzaza4
2023-09-24 02:54:39 +08:00
parent d46e40456e
commit 6d32e654bb
21 changed files with 529 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
package me.zimzaza4.geyserutils.spigot.api;
import me.zimzaza4.geyserutils.common.animation.Animation;
import me.zimzaza4.geyserutils.common.camera.instruction.Instruction;
import me.zimzaza4.geyserutils.common.channel.GeyserUtilsChannels;
import me.zimzaza4.geyserutils.common.packet.AnimateEntityCustomPayloadPacket;
import me.zimzaza4.geyserutils.common.packet.CameraInstructionCustomPayloadPacket;
import me.zimzaza4.geyserutils.common.packet.CameraShakeCustomPayloadPacket;
import me.zimzaza4.geyserutils.common.util.CustomPayloadPacketUtils;
import me.zimzaza4.geyserutils.spigot.GeyserUtils;
@@ -35,4 +37,11 @@ public class PlayerUtils {
player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet));
}
public static void sendCameraInstruction(Player player, Instruction instruction) {
CameraInstructionCustomPayloadPacket packet = new CameraInstructionCustomPayloadPacket();
packet.setInstruction(instruction);
player.sendPluginMessage(GeyserUtils.getInstance(), GeyserUtilsChannels.MAIN, GeyserUtils.getPacketManager().encodePacket(packet));
}
}