isBlocking()?

Discussion in 'Plugin Development' started by AbeJ, Jan 22, 2012.

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

    AbeJ

    I might be blind, but there doesn't seem to be a way to find out if a player is blocking that doesn't rely on CB methods. I would use them, but updating every version, and having to find new obfuscated names, is a chore.

    Is there any way to do this? If not, this and potion effects are two things that really deserve to be added to the Bukkit API, but haven't been, yet.

    I need it because I un-abandoned my magic plugin, now with fancy particles and lots of explosions. Adding in potion effects was easy. It relies on the CB jar, but all the methods are unobfuscated, and won't require updating. Blocking, unfortunately, doesn't seem to be so easy.
     
  2. I am sure you can do a check to see if the item in the players hand is a sword and then check if your right clicking.

    Excuse me if I am wrong.

    Keir
     
  3. Offline

    Technius

    No Bukkit methods yet, but fortunately, I discovered it some time ago.

    ((EntityPlayer)((CraftPlayer)player).getHandle()).L();
     
  4. Offline

    AbeJ

    Alright, I guess I'll use that. Looking through the code, it'll actually be pretty simple to find the new name every version.
     
Thread Status:
Not open for further replies.

Share This Page