diff --git a/api/src/main/java/net/md_5/bungee/api/scoreboard/Team.java b/api/src/main/java/net/md_5/bungee/api/scoreboard/Team.java index 8142bc03..b756f855 100644 --- a/api/src/main/java/net/md_5/bungee/api/scoreboard/Team.java +++ b/api/src/main/java/net/md_5/bungee/api/scoreboard/Team.java @@ -5,11 +5,13 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; import lombok.Data; +import lombok.NonNull; @Data public class Team { + @NonNull private final String name; private String displayName; private String prefix; diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/PacketD1Team.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/PacketD1Team.java index 40884387..32d4556e 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/PacketD1Team.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/PacketD1Team.java @@ -64,21 +64,21 @@ public class PacketD1Team extends DefinedPacket @Override public void write(ByteBuf buf) { - writeString( getName(), buf ); - buf.writeByte( getMode() ); - if ( getMode() == 0 || getMode() == 2 ) + writeString( name, buf ); + buf.writeByte( mode ); + if ( mode == 0 || mode == 2 ) { - writeString( getDisplayName(), buf ); - writeString( getPrefix(), buf ); - writeString( getSuffix(), buf ); - buf.writeBoolean( isFriendlyFire() ); + writeString( displayName, buf ); + writeString( prefix, buf ); + writeString( suffix, buf ); + buf.writeBoolean( friendlyFire ); } - if ( getMode() == 0 || getMode() == 3 || getMode() == 4 ) + if ( mode == 0 || mode == 3 || mode == 4 ) { - buf.writeShort( getPlayers().length ); - for ( int i = 0; i < getPlayers().length; i++ ) + buf.writeShort( players.length ); + for ( int i = 0; i < players.length; i++ ) { - writeString( getPlayers()[i], buf ); + writeString( players[i], buf ); } } }