NoCheatPlus blocking my event

Discussion in 'Plugin Development' started by sgavster, Dec 6, 2013.

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

    sgavster

    Hi,

    I was playing around, but I keep getting this:

    this is my code:

    Code:java
    1. @EventHandler
    2. public void onInteract(BlockDamageEvent e)
    3. {
    4. if(hasD(e.getPlayer()))
    5. {
    6. if(e.getPlayer().getItemInHand().getType().equals(Material.AIR))
    7. {
    8. if(!e.isCancelled())
    9. {
    10. if(!e.getBlock().getType().equals(Material.AIR))
    11. {
    12. if(QuadularMC.getWorldGuard().canBuild(e.getPlayer(), e.getBlock()))
    13. {
    14. e.setInstaBreak(true);
    15. }
    16. }
    17. }
    18. }
    19. }
    20. }


    But NCP gives me that error. How can I fix this? Thanks!
     
  2. Offline

    Gater12

    sgavster Maybe set the Event Priority to HIGH?
     
  3. Offline

    sgavster

    Gater12 I'll try. I also just found out that some blocks don't even drop.. :/
    (when I'm OP).
     
  4. Offline

    thepaperboy99

    Try looking into the NoCheatPlus API and see if you can exempt the player for the event?
     
Thread Status:
Not open for further replies.

Share This Page