Guest User

Untitled

a guest
Feb 2nd, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. // Updates a players skin
  2.     public void updatePlayerSkin(String p) {
  3.         this.checkForMultipleSkins();
  4.         String url = this.getPlayerSkin(p);
  5.         HumanEntity pl = this.getServer().getPlayer(p);
  6.         System.out.println("[iSkin] Updated " + p + " skin to " + url);
  7.         if(url != null)
  8.             SpoutManager.getAppearanceManager().setGlobalSkin(pl, url);
  9.     }
  10.    
  11.     // Updates a groups skin
  12.     public void updateGroupSkin() {
  13.        
  14.         Set<String> groups = this.getConfig().getConfigurationSection("Groups").getKeys(false);
  15.         Player[] pl = this.getServer().getOnlinePlayers();
  16.        
  17.        
  18.         for (Player p : pl) {
  19.             for (String g : groups) {
  20.                 if (p.hasPermission("iskin.group." + g)) {
  21.                         this.saveConfig();
  22.                         this.checkForMultipleSkins();
  23.                         String url = this.getGroupSkin(g);
  24.                         SpoutManager.getAppearanceManager().setGlobalSkin((HumanEntity)p, url);
  25.                 }
  26.             }
  27.         }
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment