PlayerOpEvent?

Discussion in 'Plugin Development' started by FisheyLP, Mar 11, 2015.

Thread Status:
Not open for further replies.
  1. Is there an event, that gets called when a player got op? Not only from the /op <player> command. Because noone will know if somebody got op in a plugin with p.setOp(true);
     
  2. Offline

    ItsMattHogan

  3. Offline

    LeePMC

    @ItsMattHogan @FisheyLP said not only from command, so your method isnt what he was looking for (atleast i hope so) the best advice i could give would be a continuing for loop checking if a player has been opped since the last for loop, but then again that could cause some lag on servers so if i find out anything new, ill post it here for you
     
  4. Offline

    mythbusterma

    @LeePMC

    ...that wouldn't "cause lag," that would cause the server to stall and disconnect everyone. Terrible advice.


    @FisheyLP

    Schedule a task to be run every 10 seconds (more or less depending on the precision you need) and check to see if any new players have been OP'd, you could even create your own event for it and call it.
     
    ItsMattHogan and Konato_K like this.
  5. Offline

    _Filip

Thread Status:
Not open for further replies.

Share This Page