Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Updates a players skin
- public void updatePlayerSkin(String p) {
- this.checkForMultipleSkins();
- String url = this.getPlayerSkin(p);
- HumanEntity pl = this.getServer().getPlayer(p);
- System.out.println("[iSkin] Updated " + p + " skin to " + url);
- if(url != null)
- SpoutManager.getAppearanceManager().setGlobalSkin(pl, url);
- }
- // Updates a groups skin
- public void updateGroupSkin() {
- Set<String> groups = this.getConfig().getConfigurationSection("Groups").getKeys(false);
- Player[] pl = this.getServer().getOnlinePlayers();
- for (Player p : pl) {
- for (String g : groups) {
- if (p.hasPermission("iskin.group." + g)) {
- this.saveConfig();
- this.checkForMultipleSkins();
- String url = this.getGroupSkin(g);
- SpoutManager.getAppearanceManager().setGlobalSkin((HumanEntity)p, url);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment