Purpose of isOp()?

Discussion in 'Plugin Development' started by Raphfrk, Feb 19, 2011.

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

    Raphfrk

    Is this intended to be a replacement for isAdmin?

    My interpretation of "op" is that that ranks would be

    - admin
    - op

    However, since there is no native admin rank, is op intended only to be given to players with full permissions?
     
  2. Offline

    Plague

    Notch created two groups: players and ops, where ops are the ones with full privileges, admin is just an alias for op in Notch's scheme.

    You could say that the pure admin is the one with direct SSH connectivity...
     
  3. Offline

    Valrix

    I'm guessing that there are only two ranks
    -op
    -player

    So isOP() just checks to see if they have OP or not, nothing more.

    EDIT: Ninja'd
     
  4. Offline

    Raphfrk

    It is probably more a "social" question :), so full permission for ops is reasonable then?
     
  5. Offline

    Plague

    Well yeah, because operators are there to run on the server and have a power to change the running environment. Admins should be able to change the server as a whole, and they need to have SSH to change all configs and files, so I think the name OP is also well chosen.
     
  6. Offline

    Saturisk

    Well, for instance, would you like to be one of the guys that runs a whole line of workers, like in willy wonka, but you can have no bathroom breaks?
     
  7. Offline

    Olof Larsson

    Let's take a look at: CommandSender.isOp()

    There is an interesting method you can override in JavaPlugin:
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args)

    This method is used to detect all sorts of commands. The command sender could be instance of Player if the command was used by an ingame player. BUT it could also be a server console command.

    CommandSender.isOp() Returns true if it is a server command OR an ingame player command where the player is op.
     
  8. Offline

    Infernus

    (Kick, ban, time, etc.)
     
Thread Status:
Not open for further replies.

Share This Page