66 lines
1.7 KiB
Java
66 lines
1.7 KiB
Java
package moe.oko.opennaw.model;
|
|
|
|
import net.luckperms.api.model.group.Group;
|
|
import org.bukkit.Location;
|
|
import org.bukkit.OfflinePlayer;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.UUID;
|
|
|
|
public class Nation {
|
|
public static final Nation UNCLAIMED = new Nation("UNCLAIMED", null);
|
|
|
|
private String name;
|
|
private Group group;
|
|
private Location spawn;
|
|
|
|
private HashMap<UUID, OfflinePlayer> players;
|
|
|
|
//The icon used for cities owned by this nation (default is a tower)
|
|
private String dynmapIcon;
|
|
//Should be a color of wool, used for join GUI and flag generation (TODO)
|
|
private String colour;
|
|
|
|
public Nation(String name, Group group) {
|
|
this.name = name;
|
|
this.group = group;
|
|
this.players = new HashMap<>();
|
|
this.dynmapIcon = "tower";
|
|
this.colour = "WHITE";
|
|
this.spawn = null;
|
|
}
|
|
|
|
//Db Constructor
|
|
public Nation(String name, Group group, String dynmapIcon, String colour, Location spawn) {
|
|
this.name = name;
|
|
this.group = group;
|
|
this.players = new HashMap<>();
|
|
this.colour = colour;
|
|
this.dynmapIcon = dynmapIcon;
|
|
this.spawn = spawn;
|
|
}
|
|
|
|
public String getName() { return name; }
|
|
public Group getGroup() { return group; }
|
|
public Location getSpawn() { return spawn; }
|
|
|
|
public String getColour() { return colour; }
|
|
|
|
public void setColour(String colour) { this.colour = colour; }
|
|
public void setSpawn(Location l) {
|
|
this.spawn = l;
|
|
}
|
|
|
|
public String getDynmapIcon() {
|
|
return dynmapIcon;
|
|
}
|
|
|
|
public HashMap<UUID, OfflinePlayer> getPlayerMap() {
|
|
return players;
|
|
}
|
|
|
|
public void setDynmapIcon(String dynmapIcon) {
|
|
this.dynmapIcon = dynmapIcon;
|
|
}
|
|
}
|