src/me/neznamy/tab/platforms/bukkit/features/PerWorldPlayerlist.java
@Override
	public UniversalPacketPlayOut onPacketSend(ITabPlayer receiver, UniversalPacketPlayOut packet) {
		if (packet instanceof PacketPlayOutPlayerInfo) {
			PacketPlayOutPlayerInfo info = (PacketPlayOutPlayerInfo) packet;
			if (info.action == EnumPlayerInfoAction.ADD_PLAYER) {
				List<PlayerInfoData> toRemove = new ArrayList<PlayerInfoData>();
				for (PlayerInfoData data : info.entries) {
					ITabPlayer added = Shared.getPlayerByTablistUUID(data.uniqueId);
					if (added != null) {
						if (!shouldSee(((TabPlayer)receiver).player, ((TabPlayer)added).player)) toRemove.add(data);
					}
				}
				List<PlayerInfoData> newList = new ArrayList<PlayerInfoData>();
				Arrays.asList(info.entries).forEach(d -> newList.add(d));
				newList.removeAll(toRemove);
				info.entries = newList.toArray(new PlayerInfoData[0]);
				if (info.entries.length == 0) return null;
			}
		}
		return packet;
	}
//fixing bukkit api bug making players not hide when hidePlayer is called too early
fixing bukkit api bug making players not hide when hidePlayer is called too early
fixing bukkit api bug making players not hide when hidePlayer is called too early
@Override
	public UniversalPacketPlayOut onPacketSend(ITabPlayer receiver, UniversalPacketPlayOut packet) {
		if (packet instanceof PacketPlayOutPlayerInfo) {
			PacketPlayOutPlayerInfo info = (PacketPlayOutPlayerInfo) packet;
			if (info.action == EnumPlayerInfoAction.ADD_PLAYER) {
				List<PlayerInfoData> toRemove = new ArrayList<PlayerInfoData>();
				for (PlayerInfoData data : info.entries) {
					ITabPlayer added = Shared.getPlayerByTablistUUID(data.uniqueId);
					if (added != null) {
						if (!shouldSee(((TabPlayer)receiver).player, ((TabPlayer)added).player)) toRemove.add(data);
					}
				}
				List<PlayerInfoData> newList = new ArrayList<PlayerInfoData>();
				Arrays.asList(info.entries).forEach(d -> newList.add(d));
				newList.removeAll(toRemove);
				info.entries = newList.toArray(new PlayerInfoData[0]);
				if (info.entries.length == 0) return null;
			}
		}
		return packet;
	}
@ Override public UniversalPacketPlayOut onPacketSend ( ITabPlayer receiver , UniversalPacketPlayOut packet ) { if ( packet instanceof PacketPlayOutPlayerInfo ) { PacketPlayOutPlayerInfo info = ( PacketPlayOutPlayerInfo ) packet ; if ( info . action == EnumPlayerInfoAction . ADD_PLAYER ) { List < PlayerInfoData > toRemove = new ArrayList < PlayerInfoData > ( ) ; for ( PlayerInfoData data : info . entries ) { ITabPlayer added = Shared . getPlayerByTablistUUID ( data . uniqueId ) ; if ( added != null ) { if ( ! shouldSee ( ( ( TabPlayer ) receiver ) . player , ( ( TabPlayer ) added ) . player ) ) toRemove . add ( data ) ; } } List < PlayerInfoData > newList = new ArrayList < PlayerInfoData > ( ) ; Arrays . asList ( info . entries ) . forEach ( d -> newList . add ( d ) ) ; newList . removeAll ( toRemove ) ; info . entries = newList . toArray ( new PlayerInfoData [ 0 ] ) ; if ( info . entries . length == 0 ) return null ; } } return packet ; }
fixing bukkit api bug making players not hide when hidePlayer is called too early
fixing bukkit api bug making players not hide when hidePlayer is called too early