Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Angeschossen committed Mar 27, 2023
1 parent 2106d3b commit 264bd6d
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/me.angeschossen.lands.api/war/CaptureFlag.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package me.angeschossen.lands.api.war;

public interface CaptureFlag {
}
35 changes: 35 additions & 0 deletions src/main/java/me.angeschossen.lands.api/war/WarStats.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,52 @@

public interface WarStats {

/**
* Get win-lost wars ratio.
*
* @return win-lost wars ratio
*/
double getWLRatio();

/**
* Get amount of wars won.
*
* @return Amount of wars that they have won
*/
int getWon();

/**
* Get amount of wars lost.
*
* @return Amount of wars that they have lost
*/
int getLost();

/**
* Get kill-death wars ratio.
*
* @return kill-death ratio
*/
double getKDRatio();

/**
* Get amount of kills.
*
* @return Amount of kills
*/
int getKills();

/**
* Get amount of deaths.
*
* @return Amount of deaths
*/
int getDeaths();

/**
* Get amount of captures. See {@link CaptureFlag} for more information.
*
* @return Amount of captures
*/
int getCaptures();
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,40 @@

public interface WarDeclaration {

/**
* Set tribute, which the surrenderer must pay to the enemy if they surrender.
*
* @param tribute Depending on the server's economy this can be cash, items etc.
*/
void setTribute(double tribute);

/**
* Set tribute, which the surrenderer must pay to the enemy if they surrender.
*
* @return Can't be negative
*/
double getTribute();

/**
* Depending on the server's config there can be a maximum tribute.
*
* @param warTeam The team
* @return Can't be negative
*/
double getMaxTribute(WarTeam warTeam);

/**
* Check if the war preparation time ends soon.
* Depends on the server's config.
*
* @return true, if the war starts in a matter of seconds
*/
boolean startsSoon();

/**
* Forcefully start this war.
*
* @return The war
*/
War start();
}

0 comments on commit 264bd6d

Please sign in to comment.