Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- /## /###### /###### /######## /###### /## /## /######
- | ## |_ ##_/ /##__ ##|__ ##__//##__ ##| ## | ##|_ ##_/
- | ## | ## | ## \__/ | ## | ## \__/| ## | ## | ##
- | ## | ## | ###### | ## | ## /####| ## | ## | ##
- | ## | ## \____ ## | ## | ##|_ ##| ## | ## | ##
- | ## | ## /## \ ## | ## | ## \ ##| ## | ## | ##
- | ######## /######| ######/ | ## | ######/| ######/ /######
- |________/|______/ \______/ |__/ \______/ \______/ |______/
- ListGUI v1.1.5
- By: aBooDyy | aBooDyy#9543 | https://aBooDyy.net
- https://www.mc-market.org/resources/9956/
- Using DeluxeMenus, PlaceholderAPI plugins
- By: Clip | clip#0001 | https://extendedclip.com/
- and using ParseOther expansion (PlaceholderAPI expansion)
- By: cj89898 | cj89898#7801 | cjservers.net
- Feel free to contact me if you have issue or suggestions
- Discord: https://aBooDyy.net/discord
- */
- var File=Java.type("java.io.File");var yamlConfig=org.bukkit.configuration.file.YamlConfiguration;function getSettings(){var file=new File("plugins"+File.separator+"ListGUI","settings.yml");var conf=new yamlConfig();try{conf.load(file);return conf;}catch(e){return BukkitServer.getLogger().info("[ListGUI] Couldn't load settings.yml file.");}}var players=eval('%listgui_players%');function color(p){if(getSettings().getBoolean("sort_options.enable_groups")){var groups=getSettings().getConfigurationSection("sort_options.groups").getKeys(false);var sortedGroups=[];groups.forEach(function(group){sortedGroups.push(parseInt(group));});sortedGroups.sort(function(a,b){return a-b});for(var i=0;i<sortedGroups.length;i++){if(BukkitServer.getPlayerExact(p).hasPermission(getSettings().getString("sort_options.groups."+sortedGroups[i]+".permission"))){return getSettings().getString("sort_options.groups."+sortedGroups[i]+".color");}}}return getSettings().getString("sort_options.default_color");}function playersList(){switch(args.length){case 1:switch(args[0]){case"online":if(server.getPlayerExact("%javascript_listgui_stats%")!==null){return"yes";}return"no";break;case"menus":var menus=Math.ceil(players.length/45).toFixed();return menus;break;case"length":return players.length;break;default:if(players.length>=parseInt(args[0])+1){return players[args[0]];}return"";}break;case 2:if(players.length>=parseInt(args[1])+1){return color(players[args[1]]);}return "";break;}}playersList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement