Skip to content

Commit

Permalink
Add 2 new options:
Browse files Browse the repository at this point in the history
- biome-change-timeout - timeout when biome change should be stopped.
- parallel-biome-changes - number of parallel biome change processes.
  • Loading branch information
BONNe committed Jan 21, 2022
1 parent 561cf98 commit 0dadddd
Showing 1 changed file with 63 additions and 3 deletions.
66 changes: 63 additions & 3 deletions src/main/java/world/bentobox/biomes/config/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,53 @@ public void setAdminCommand(String adminCommand)
}


// ---------------------------------------------------------------------
// Section: Enums used for Settings.
// ---------------------------------------------------------------------
/**
* Gets concurrent biome updates.
*
* @return the concurrent biome updates
*/
public int getConcurrentBiomeUpdates()
{
return concurrentBiomeUpdates;
}


/**
* Sets concurrent biome updates.
*
* @param concurrentBiomeUpdates the concurrent biome updates
*/
public void setConcurrentBiomeUpdates(int concurrentBiomeUpdates)
{
this.concurrentBiomeUpdates = concurrentBiomeUpdates;
}


/**
* Gets change timeout.
*
* @return the change timeout
*/
public long getChangeTimeout()
{
return changeTimeout;
}


/**
* Sets change timeout.
*
* @param changeTimeout the change timeout
*/
public void setChangeTimeout(long changeTimeout)
{
this.changeTimeout = changeTimeout;
}


// ---------------------------------------------------------------------
// Section: Enums used for Settings.
// ---------------------------------------------------------------------


/**
Expand Down Expand Up @@ -387,6 +431,22 @@ public static UpdateMode getMode(String parameter)
@SuppressWarnings("javadoc")
private int coolDown = 60;

@ConfigComment("")
@ConfigComment("Number of minutes in which biome change will be cancelled. It may happen in busy server or")
@ConfigComment("huge island areas.")
@ConfigComment("Default value = 5")
@ConfigEntry(path = "biome-change-timeout")
@SuppressWarnings("javadoc")
private long changeTimeout = 5;

@ConfigComment("")
@ConfigComment("Number of biome changes at the same time. Setting it to 0 or lower will disable biome change")
@ConfigComment("completely.")
@ConfigComment("Default value = 1")
@ConfigEntry(path = "parallel-biome-changes")
@SuppressWarnings("javadoc")
private int concurrentBiomeUpdates = 1;

@ConfigComment("Player main sub-command to access the addon.")
@ConfigComment("This command label will be required to write after gamemode player command label, f.e. /[label] biomes")
@ConfigComment("Each alias must be separated with an empty space.")
Expand Down

0 comments on commit 0dadddd

Please sign in to comment.