Skip to main content
SwissTeams Reference item reference.

Team Object

PropertyTypeDescription
idStringThe unique identifier of the team
nameStringThe name of the team
descriptionStringThe description of the team (DEPRECATED)
membersList<Object>The list of members in the team
leaderObjectThe team leader
bankIntegerThe amount of money in the team bank (DEPRECATED)
killsIntegerThe number of kills the team has
deathsIntegerThe number of deaths the team has
homeLocationThe home location of the team (DEPRECATED)
warpsHashMap<String, Location>The list of warps for the team (DEPRECATED)
invitedList<Player>The list of players invited to the team
Each of the above has a getter and setter method, e.g. getName() and setName(String name). Example:
...

Team team = teamAPI.getTeam("PlayerUUID"); // Get team by player UUID
if (team != null) {
    String teamName = team.getName();
    List<Object> members = team.getMembers(); // (Object can be Player or OfflinePlayer)
    Object leader = team.getLeader();
    int kills = team.getKills();
    int deaths = team.getDeaths();
}
...
FunctionReturn TypeDescription
hasPlayer(UUID)booleanChecks if a player is in the team by their UUID
hasPlayer(Player)booleanChecks if a player is in the team by their Player object
addKill()voidIncrements the team’s kill count by 1
addDeath()voidIncrements the team’s death count by 1
isInvited(Player)booleanChecks if a player is invited to the team
addInvited(Player)TeamAdds a player to the invited list
removeInvited(Player)TeamRemoves a player from the invited list
messageAll(String)TeamSends a message to all team members (colour codes supported with ’&‘)

I’m nice so I’ll show you how to get the player from the Object

...

// Check if leader is online (aka instanceof Player)
if (team.getLeader() instanceof Player) {

    Player leaderPlayer = (Player) team.getLeader();

    System.out.println("The leader is online: " + leaderPlayer.getName());

    leaderPlayer.sendMessage("You are the leader of the team: " + team.getName());

} else if (team.getLeader() instanceof OfflinePlayer) {

    // If not online, it will be an OfflinePlayer
    OfflinePlayer leaderOffline = (OfflinePlayer) team.getLeader();

    System.out.println("The leader is offline: " + leaderOffline.getName());

} else {

    // If it gets to this point, something went very wrong
    System.out.println("The leader is neither online nor offline, something went wrong!");

}
...

Bounty Object

PropertyTypeDescription
idStringUnique identifier of the bounty
targetUUIDUUID of the target player
ownerUUIDUUID of the bounty owner (original creator)
amountintFULL bounty amount
claimedbooleanIf the bounty has been claimed (completed)
createdAtlongSystem time in milliseconds when the bounty was created
claimedAtlongSystem time in milliseconds when the bounty was claimed
reasonStringThe bounty reason
Each of the above has a getter and setter method, e.g. getName() and setName(String name).