[Request] Admin List

Discussion in 'Archived: Plugin Requests' started by ColeBergmann, Jul 15, 2012.

  1. Offline

    ColeBergmann

    Plugin category: Admin

    Suggested name: StaffList

    What I want: I would like a plugin that gives a staff player list with prefixes. I have seen Playerz, but I believe this plugin is not great. I would also like the plugin to give a broadcast of the amount of online players at a configurable amount of time. Here is what I would like the list to look like:
    http://pastebin.com/c4A5KmMt

    Also, the plugin should be fully configurable and work with PermissionsEx. Players with the staff permission will be able to be on the staff list, and their prefix will also be shown. Here is a sample config.yml:
    http://pastebin.com/eE7Zeq9U

    Ideas for commands: /list (Shows online staff) /who (Shows online staff) /online (Shows online staff)

    Ideas for permissions: stafflist.use (Allows commands to view the list (/list))
    stafflist.staff (Allows the player to be shown on the staff list)

    When I'd like it by: As Soon As Possible
     
  2. Offline

    izak12345678910

    I could do this but my eclipse is broken so I won't be able to compile it and instead of just making it for server name can i already do it for reclaimer craft will be a lot easier.
    McLuke500 made something similar but it says compass craft maybe if you ask him to change it and make it configureable? Also should think colors should be configureable
     
  3. Offline

    ColeBergmann

    Sure, if you could make one that would be great!
     
  4. Offline

    Dunsuro

    ColeBergmann

    I've made your plugin. You can download it here: <Edit by Moderator: Redacted mediafire url>

    It formats it like this:
    ---StaffLIst---
    (Owner) ~Bob - IGN: BobIsGreat42

    This was done so that if an admin had a nickname then his IGN would still be visible
    If you need anything else done, please contact me, although I may not be able to reply for awhile

    EDIT: if the prefix of Bob is colored, it will be colored in the staff list
     
    Last edited by a moderator: Nov 10, 2016
  5. Offline

    ColeBergmann

  6. Offline

    Dunsuro

    Oh, it's because the plugin version is out of date. I'll update it real quick

    ColeBergmann New download link: <Edit by Moderator: Redacted mediafire url>
    Give a "StaffList.Show" permission to anyone you want to be seen on the list.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 10, 2016
  7. Offline

    ColeBergmann

    Still getting this weird error :/
    http://pastebin.com/aLUgEDb0
    Also, at the top could it be configurable so it could say ---[ReclaimerCraft]---
     
  8. Offline

    ColeBergmann

    This is just a list of the staff members. Even if they are not online. I would like a list of staff members that are online.
     
  9. Use EssentialsChat and config in Essentials
    # Sort output of /list command by groups
    sort-list-by-groups: true

    Then u will see the Admin/Moderator/Owner/Player/Member all what u want
     
  10. Offline

    np98765

    Do you know how to change the order of the way the groups are displayed? Mine sort alphabetically, and make no sense that way. -_-
     
  11. >.> np98765 i was only helpful Omg >.>
     
  12. Offline

    np98765

    I just was curious! I'm didn't post this, but I saw your comment and was wondering if I'm missing something in Essentials. ;)
     
  13. Offline

    ColeBergmann

    I'm looking for something to just show staff. If it shows players too it gets too long and people can not find staff.
     
  14. Offline

    fredghostkyle1

    ya, looks to be a bug in essentials, im reporting it now!
     
  15. Offline

    McLuke500

    It is configurable if i remember

    Here is that post

    Config is

    CompassCraft:
    cwho:
    - '&3--------=[ &9CompassCraft &3]=--------'
    - '&3There are &6(&e%allplayers%&6) &3players online.'
    - '&5Online staff: &d%staff%'
    - '&2Online Donators: &a%donators%'


    The %allplayers% is all players
    %staff% is number of staff
    %donators% is all donators


    Permissions are compasscraft.cwho to use the command /cwho

    compasscraft.reload to use /cwho reload


    then compasscraft.staff
    and compasscraft.donator

    Colorcodes work

    Download https://dl.dropbox.com/u/20849260/Compasscraft.jar




    And if anyones interested source code

    Code:
    package me.mcluke300.compasscraft;
     
     
    import java.util.ArrayList;
    import java.util.List;
     
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class main extends JavaPlugin implements Listener{
     
        public static main plugin;
     
        @Override
        public void onEnable() {
            LoadConfiguration();
            plugin = this;
            System.out.println(this+" has been Enabled");
            Bukkit.getServer().getPluginManager().registerEvents(this, this);
        }
        @Override
        public void onDisable() {
            System.out.println(this+" has been Disabled");
        }
     
     
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
            if(commandLabel.equalsIgnoreCase("cwho")) {
             
                //Main Command
                if(args.length == 0 && sender.hasPermission("compasscraft.cwho")) {
                    List<String> words = plugin.getConfig().getStringList("CompassCraft.cwho");
                    String allplayers = "" + Bukkit.getOnlinePlayers().length + "/" + Bukkit.getMaxPlayers();
                    int staffp = 0;
                    int donatorp = 0;
                    Player[] players = Bukkit.getOnlinePlayers();
                    for (Player playerP : players) {
                        if (playerP.hasPermission("compasscraft.staff")) {
                            staffp++;
                        }
                        if (playerP.hasPermission("compasscraft.donator")) {
                            donatorp++;
                        }
                    }
                    String staffpp = "" + staffp;
                    String donatorpp = "" + donatorp;
                    for (String m : words) {
                        m = m.replaceAll("%allplayers%", allplayers);
                        m = m.replaceAll("%staff%", staffpp);
                        m = m.replaceAll("%donators%", donatorpp);
                        m = m.replaceAll("&([0-9a-fA-F])", "§$1");
                        sender.sendMessage(m);
                    }
     
                 
                 
                }else if (args.length == 1){
                 
                    //Reload
                    if (args[0].equalsIgnoreCase("reload") && sender.hasPermission("compasscraft.reload")) {
                        getConfig();
                        reloadConfig();
                        getServer().getPluginManager().disablePlugin(plugin);
                        getServer().getPluginManager().enablePlugin(plugin);
                        sender.sendMessage(ChatColor.GREEN+"Compasscraft Config Reloaded");
                    }
                } else if (args.length < 2) {
                    return false;
                }
            }
            return false;
        }
     
        public void LoadConfiguration() {
            List<String> words = new ArrayList<String>();
            String path = "CompassCraft.cwho";
            words.add("&3--------=[ &9CompassCraft &3]=--------");
            words.add("&3There are &6(&e%allplayers%&6) &3players online.");
            words.add("&5Online staff: &d%staff%");
            words.add("&2Online Donators: &a%donators%");
            getConfig().addDefault(path, words);
            getConfig().options().copyDefaults(true);
            saveConfig();
        }
     
    }
    
     
  16. uuuhggg in groupmanager just sort the groups how u want it i think that would help to
     
  17. Offline

    ColeBergmann

    Is there any way that it can actually show the player name instead of just the number?
     
  18. Offline

    fredghostkyle1

    ya, that would be nice.

    btw can u make this a public plugin?
     
  19. Offline

    kyllingman2

    Could you add a feature where you can do for example %staffplayers% and then all the staff players would come up, instead of just the number? Something similar to donators too would be cool.
     
  20. Offline

    fredghostkyle1

    maybe, in the comfig have somthing like this:
    Confiy.yml:
    Code:
    CompassCraft:
    cwho:
    - '&3--------=[ &9CompassCraft &3]=--------'
    - '&3There are &6(&e%allplayers%&6) &3players online.'
    - '&5Online staff: &d%staff%'
    - '&2Online Donators: &a%donators%'
    Custom:
     - %NAMEHERE%
       Premissions: CompassCraft.NAMEHERE
    
    do that ppl with the premissions have there one rank.
    btw maybe have it like /who not /cwho.
     
  21. Offline

    McLuke500

    Im not making this a public plugin because it is too simple and there are much better ones out there. Even essentials can make /who show groups as lists...
     
  22. Offline

    fredghostkyle1

    yes. did u read what i rote above u
    <3 the plugin. good job
     
  23. Offline

    McLuke500

    It took 4 minutes it's not a good plugin playerlogger is a good plugin.
     
  24. Offline

    kyllingman2

    If you got another 4 minutes, could you add so you can actually see who's the staff and donators, instead of just how many it is?
     

Share This Page