示例#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;
 }
示例#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);
   }
 }
示例#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]"));
         }
       }
     }
   }
 }
示例#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]"));
         }
       }
     }
   }
 }
示例#6
0
 @Override
 public boolean containsKey(SNodeId key) {
   if (!(key instanceof Regular)) return false;
   return myRegularMap.containsKey(((Regular) key).getId());
 }