Do I have to listen to both events?

Discussion in 'Plugin Development' started by thefrooh, May 13, 2015.

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

    thefrooh

    I'm creating a really simple authentication plugin for my server. My question is, if i'm listening to PlayerInteractEvent, and cancel it as long as the user is not authenticated with a command, should I listen to BlockBreakEvent too, and cancel it if he tries to break one, or the Interact event covers the break event? Also, hitting a player counts as an Interact event too, right?
     
  2. Offline

    MexMaster

    @thefrooh
    Yep you can stop block breaking by cancelling the interact event
    You could also check this yourself by cancelling all interact events and try to break a block
     
  3. Offline

    Zombie_Striker

    If you're using an Editor for writing code, you could look at allmethods that regaurd the player and , if you think the player should not be allowed to do those things (Issue commands, SpawnEntityies, useCommandblocks, Use Items, Craft), cancle it.

    This is where you can find all classes/methods/events.
    https://github.com/Bukkit/mc-dev/tree/master/net/minecraft/server
     
Thread Status:
Not open for further replies.

Share This Page