public final class Faction { private final Set players = new HashSet<>(); private final String name; private String description; public Faction(String name) { this.name = name; } public String getName(){ return name; } public Set getPlayers() { return players; } public void addPlayer(FPlayer fPlayer) { players.add(fPlayer); } public void removePlayer(FPlayer fPlayer) { players.remove(fPlayer); } public String getDescription() { if(description == null) description = "Default description"; // Its better to set the description when creating the faction so it can be never null return description; } public void setDescription(String description) { this.description = description; } }