Plugin category: chat Suggested name: list What I want please: when anyone does /list or /who i want it to show the ranks and the people online who are in them ranks and how many people are online out the number of slots. use the ranks out of PermissionsEX so when i add a new rank it will put it in the list. and people with the rank will have there prefix colour in the list. There Are (99/100) Online =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= &8Owner: &4ii_B1GM4N_xx &8Admin: &cName,Name,Name &8Mod: &5Name,Name &8Vip: &aName Ideas for commands: - /list -/who Ideas for permissions: - list.see (Not Needed) When I'd like it by: 1-2 weeks? Thank You
you need to say what permissions plugin you are using otherwise we can't work out what people are in what group
[quote uid=87695 name="timtower" post=2386631]He said and you can hook into Vault, works with almost every permission plugin.[/quote] Wow i was really blind, thanks for pointing that out :/ Okay, this should work although i haven't tested it with more then one player. This is the file: <Edit by Moderator: Redacted mediafire url> And the code: Code:java package biz.boulter.bl; import net.milkbowl.vault.permission.Permission;import org.bukkit.ChatColor;import org.bukkit.command.Command;import org.bukkit.command.CommandSender;import org.bukkit.entity.Player;import org.bukkit.plugin.RegisteredServiceProvider;import org.bukkit.plugin.java.JavaPlugin; public class BetterList extends JavaPlugin{ private Permission perms = null; @Override public void onEnable(){ setupPermissions(); } public void setupPermissions(){ RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class); perms = rsp.getProvider(); } @Override public boolean onCommand(CommandSender s, Command c, String l, String[] args){ if(c.getName().equalsIgnoreCase("blist")){ s.sendMessage(ChatColor.GREEN+"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); s.sendMessage("There are "+getServer().getOnlinePlayers().length+"/"+getServer().getMaxPlayers()+" Players Online"); s.sendMessage(ChatColor.GREEN+"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="); String[] groups = perms.getGroups(); for(String group: groups){ String message = ChatColor.GOLD+group+ChatColor.WHITE+": "; Player[] players = getServer().getOnlinePlayers(); int x = 1; for(Player player: players){ if(perms.playerInGroup(player.getLocation().getWorld(), player.getName(), group)){ message = message+player.getDisplayName()+" "; x++; } } if(x == 1){ message = message+"None!"; } s.sendMessage(message); } } return false; }} EDIT by Moderator: merged posts, please use the edit button instead of double posting.
ok hang on <Edit by Moderator: Redacted mediafire url> and the permission is betterlist.see EDIT by Moderator: merged posts, please use the edit button instead of double posting.