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())); } } }
public void updateAllCustomBlockDesigns(Player[] players) { for (TLongObjectIterator it = customBlockDesigns.iterator(); it.hasNext(); ) { it.advance(); updateCustomBlockDesigns(players, it.key(), (BlockDesign) it.value()); } }