It is an error to pass an empty type array.
Dieser Commit ist enthalten in:
Ursprung
54ef43fae8
Commit
4d11cfa8e8
@ -391,6 +391,7 @@ public abstract class PacketAdapter implements PacketListener {
|
||||
* @return Helper object.
|
||||
*/
|
||||
public static AdapterParameteters params(Plugin plugin, PacketType... packets) {
|
||||
|
||||
return new AdapterParameteters().plugin(plugin).types(packets);
|
||||
}
|
||||
|
||||
@ -545,8 +546,10 @@ public abstract class PacketAdapter implements PacketListener {
|
||||
this.connectionSide = ConnectionSide.add(this.connectionSide, type.getSender().toSide());
|
||||
}
|
||||
}
|
||||
|
||||
this.packets = Preconditions.checkNotNull(packets, "packets cannot be NULL");
|
||||
|
||||
if (packets.length == 0)
|
||||
throw new IllegalArgumentException("Passed an empty packet type array.");
|
||||
return this;
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren