mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-11-30 14:13:47 +01:00
String arrays are only send by servers/Bungeecord. No need to limit their size
This commit is contained in:
parent
540e924bfb
commit
891ad8711d
@ -56,7 +56,6 @@ public abstract class DefinedPacket
|
|||||||
|
|
||||||
public static void writeStringArray(List<String> s, ByteBuf buf)
|
public static void writeStringArray(List<String> s, ByteBuf buf)
|
||||||
{
|
{
|
||||||
Preconditions.checkArgument( s.size() <= 64, "Cannot send string array longer than 64 (got %s strings)", s.size() );
|
|
||||||
writeVarInt( s.size(), buf );
|
writeVarInt( s.size(), buf );
|
||||||
for ( String str : s )
|
for ( String str : s )
|
||||||
{
|
{
|
||||||
@ -67,7 +66,6 @@ public abstract class DefinedPacket
|
|||||||
public static List<String> readStringArray(ByteBuf buf)
|
public static List<String> readStringArray(ByteBuf buf)
|
||||||
{
|
{
|
||||||
int len = readVarInt( buf );
|
int len = readVarInt( buf );
|
||||||
Preconditions.checkArgument( len <= 64, "Cannot receive string array longer than 64 (got %s strings)", len );
|
|
||||||
List<String> ret = new ArrayList<>( len );
|
List<String> ret = new ArrayList<>( len );
|
||||||
for ( int i = 0; i < len; i++ )
|
for ( int i = 0; i < len; i++ )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user