Results 1 to 3 of 3
  1. #1
    DatSuperSalmon's Avatar
    Join Date
    Aug 2013
    Gender
    male
    Location
    The city of cities
    Posts
    10
    Reputation
    10
    Thanks
    1
    My Mood
    Relaxed

    Deop All Ops Code?

    I've searched this on google, asked on Y!A and I still can't find this.
    I just made a plugin that gives op on command, but I want to know what the code is where you type in a certain command and it deop all people who are currently op. If I can get my question solved, I will post my final plugin on the site for you all to use.
    Thanks

  2. #2
    RandomAmazingGuy's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    113
    Reputation
    14
    Thanks
    4,737
    My Mood
    Amused
    I've never used Bukkit's API, but the principle is something like this:

    Code:
    for(Player p: PlayerList){
    
    if(p.isOp() && p != commandSender)
    Server.deop(p);
    }
    
    }

  3. #3
    GM-Hacker's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    74
    That only deops OPs that is online. You need to use
    Code:
    for (OfflinePlayer p : getServer().getOperators()) {
        p.setOp(false);
    }

Similar Threads

  1. List of all "wanted codes" ?
    By max-11 in forum CrossFire Discussions
    Replies: 57
    Last Post: 05-28-2011, 05:57 PM
  2. [Release] Black Ops Codes Program
    By cgallagher21 in forum Call of Duty Black Ops Coding, Programming & Source Code
    Replies: 11
    Last Post: 11-23-2010, 03:25 PM
  3. Since I play PSP, Here are all my codes
    By Join F.E.A.® On So©omFTB2 in forum General
    Replies: 0
    Last Post: 10-24-2010, 09:32 AM
  4. Selling all retail codes!(famas,awm,g36c_d,m134,m60 and m249)
    By Spr1ngf1ld4 in forum Trade Accounts/Keys/Items
    Replies: 7
    Last Post: 07-11-2008, 12:34 AM
  5. ALL WEAPON CODES
    By jesse900 in forum Trade Accounts/Keys/Items
    Replies: 9
    Last Post: 03-31-2008, 01:01 PM

Tags for this Thread