PacketPlayOutBlockBreakAnimation don't go

Discussion in 'Plugin Development' started by scienziato1pazzo, May 31, 2023.

Thread Status:
Not open for further replies.
  1. I want to create a plugin that when you place a block it breaks it by triggering the block breaking animation but I can't use "PacketPlayOutBlockBreakAnimation" and it gives me error

    Code:
    public void sendBreakAnimationPacket(Player player, BlockPosition position, int stage) {
            PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
            playerConnection.sendPacket(new PacketPlayOutBlockBreakAnimation(-player.getEntityId(), position, stage));
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Online

    timtower Administrator Administrator Moderator

    Compile error? Runtime error? What are you talking about?
    If compile error: hover the mouse over it, it will tell you what is wrong.
     
  4. sorry but i've been busy. I tried to use grandle but I see that NMS is not imported! upload_2023-6-18_12-5-57.png

    upload_2023-6-18_12-6-26.png
     
    Last edited by a moderator: Jun 18, 2023
  5. Offline

    KarimAKL

    @scienziato1pazzo It would seem you don't have access to a repository with the NMS files; did you run BuildTools to generate the repository for the specified server version?
     
Thread Status:
Not open for further replies.

Share This Page