Пример #1
0
 public void onPlayerJoin(SpoutPlayer player) {
   if (((SpoutPlayer) player).isSpoutCraftEnabled()) {
     for (TLongObjectIterator it = customNames.iterator(); it.hasNext(); ) {
       it.advance();
       ((SpoutPlayer) player)
           .sendPacket(
               new PacketItemName(msw(it.key()), (short) lsw(it.key()), (String) it.value()));
     }
     for (TLongObjectIterator it = customTextures.iterator(); it.hasNext(); ) {
       it.advance();
       String pluginName = (String) customTexturesPlugin.get(it.key());
       ((SpoutPlayer) player)
           .sendPacket(
               new PacketItemTexture(
                   msw(it.key()), (short) lsw(it.key()), pluginName, (String) it.value()));
     }
   }
 }
Пример #2
0
 public void updateAllCustomBlockDesigns(Player[] players) {
   for (TLongObjectIterator it = customBlockDesigns.iterator(); it.hasNext(); ) {
     it.advance();
     updateCustomBlockDesigns(players, it.key(), (BlockDesign) it.value());
   }
 }