Example #1
0
 public String getCustomItemTexturePlugin(Material item, short data) {
   long info = toLong(item.getId(), data);
   if (customTexturesPlugin.containsKey(info)) {
     return (String) customTexturesPlugin.get(info);
   }
   return null;
 }
Example #2
0
 @Override
 public String getCustomItemName(Material item, short data) {
   long key = toLong(item.getId(), data);
   if (customNames.containsKey(key)) {
     return (String) customNames.get(key);
   }
   return null;
 }
 public boolean containsKey(SNodeId key) {
   if (key instanceof Regular) {
     return myRegularMap.containsKey(((Regular) key).getId());
   } else if (key instanceof Foreign) {
     return myForeignMap.containsKey(((Foreign) key).getId());
   } else {
     return myOtherMap.containsKey(key);
   }
 }
Example #4
0
 @Override
 public void resetName(Material item, short data) {
   long key = toLong(item.getId(), data);
   if (customNames.containsKey(key)) {
     customNames.remove(key);
     for (Player player : Bukkit.getServer().getOnlinePlayers()) {
       if (player instanceof SpoutCraftPlayer) {
         if (((SpoutPlayer) player).isSpoutCraftEnabled()) {
           ((SpoutPlayer) player)
               .sendPacket(new PacketItemName(msw(key), (short) lsw(key), "[reset]"));
         }
       }
     }
   }
 }
Example #5
0
 @Override
 public void resetTexture(Material item, short data) {
   long info = toLong(item.getId(), data);
   if (customTextures.containsKey(info)) {
     customTextures.remove(info);
     String pluginName = (String) customTexturesPlugin.remove(info);
     for (Player player : Bukkit.getServer().getOnlinePlayers()) {
       if (player instanceof SpoutCraftPlayer) {
         if (((SpoutPlayer) player).isSpoutCraftEnabled()) {
           ((SpoutPlayer) player)
               .sendPacket(
                   new PacketItemTexture(msw(info), (short) lsw(info), pluginName, "[reset]"));
         }
       }
     }
   }
 }
Example #6
0
 @Override
 public boolean containsKey(SNodeId key) {
   if (!(key instanceof Regular)) return false;
   return myRegularMap.containsKey(((Regular) key).getId());
 }