Forcing a player to dig a block

Discussion in 'Plugin Development' started by orange451, Nov 11, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    orange451

    I am developing a plugin for a server, called mcRPG (basically like mcMMO, without the leveling). A problem we've come over, though, is the ability to break Obsidian faster (like in mcmmo). In that plugin, it can break through faction land that is not your own, so I tried sending the Packet14BlockDig packet from the player to the server, but I honestly don't know how to use it.
    My current code:
    Code:
                    Packet14BlockDig packet = new Packet14BlockDig();
                    packet.a = 0;//2;
                    packet.b = 0;//block.getLocation().getBlockX();
                    packet.c = 0;//block.getLocation().getBlockY();
                    packet.e = 0;//block.getLocation().getBlockZ();
                    ((CraftPlayer)pl).getHandle().netServerHandler.sendPacket(packet);
    Could someone explain which each variable for that packet means?
     
  2. Offline

    Dnewhard

    I do some client modding, fairly sure that b is Y, and c and e are X and Z, but i dont know which of c and e is x and z. Not sure what a is, i never really mess with block breaking. in my mods.
     
  3. Offline

    orange451

    Anyone else have any information?
    I checked the craftbukkit github, there's only Packet3 and Packet51 documentation :/
     
  4. Offline

    md_5

    You are gonna run into hell with that. You need to have a timer to send it each time. The server will only accept packets at a max of about ~3x faster than normal, so doing that with the only delay being execution time will result in it being broken client and then the server placing it back.
    I can't remember what the variables are but if you look at the function that calls them the arguments are in order, xyz.
     
  5. Offline

    matter123

    also im 99% sure ((CraftPlayer)pl).getHandle().netServerHandler.sendPacket(packet);
    will send the packet to the client instead of the server
     
Thread Status:
Not open for further replies.

Share This Page