mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-18 15:18:26 +01:00
Fixed conflicts. Removed "y" variable in Island as it is useless.
This commit is contained in:
parent
6d0611f717
commit
251c2e92f2
10
config.yml
10
config.yml
@ -400,6 +400,16 @@ island:
|
||||
reset: true
|
||||
reset-wait: 10
|
||||
|
||||
# Deaths count
|
||||
deaths:
|
||||
# Max deaths
|
||||
# If player dies more than this, it doesn't count anymore
|
||||
max: 10
|
||||
|
||||
# Sum team deaths - if true, all the teams deaths are summed
|
||||
# If false, only the leader's deaths counts
|
||||
sum-team: false
|
||||
|
||||
### Protection Settings ###
|
||||
protection:
|
||||
# Allow pistons to push outside of the protected area (maybe to make bridges)
|
||||
|
@ -72,7 +72,7 @@ public class BSkyBlock extends JavaPlugin{
|
||||
islandsManager.save(true);
|
||||
offlineHistoryMessages.save(true);
|
||||
}
|
||||
}, Settings.backupPeriod, Settings.backupPeriod);
|
||||
}, Settings.databaseBackupPeriod, Settings.databaseBackupPeriod);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -349,12 +349,12 @@ public class IslandCommand extends BSBCommand{
|
||||
}
|
||||
|
||||
// Check if the name isn't too short or too long
|
||||
if(name.length() < Settings.minIslandNameLength){
|
||||
Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooShort.replace("[length]", String.valueOf(Settings.minIslandNameLength)));
|
||||
if(name.length() < Settings.nameMinLength){
|
||||
Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooShort.replace("[length]", String.valueOf(Settings.nameMinLength)));
|
||||
return;
|
||||
}
|
||||
if(name.length() > Settings.maxIslandNameLength){
|
||||
Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooLong.replace("[length]", String.valueOf(Settings.maxIslandNameLength)));
|
||||
if(name.length() > Settings.nameMaxLength){
|
||||
Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooLong.replace("[length]", String.valueOf(Settings.nameMaxLength)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ public class Settings {
|
||||
|
||||
/* WORLD */
|
||||
public static String worldName;
|
||||
public static int distance;
|
||||
public static int islandDistance;
|
||||
public static int protectionRange;
|
||||
public static int startX;
|
||||
public static int startZ;
|
||||
@ -117,6 +117,10 @@ public class Settings {
|
||||
public static boolean confirmReset;
|
||||
public static int confirmResetWait;
|
||||
|
||||
// Deaths
|
||||
public static int deathsMax;
|
||||
public static boolean deathsSumTeam;
|
||||
|
||||
/* PROTECTION */
|
||||
public static boolean allowPistonPush;
|
||||
public static boolean restrictWither;
|
||||
|
@ -38,8 +38,6 @@ public class Island {
|
||||
private int minProtectedZ;
|
||||
// Protection size
|
||||
private int protectionRange;
|
||||
// Height of island
|
||||
private int y;
|
||||
// World the island is in
|
||||
private World world;
|
||||
|
||||
@ -582,18 +580,18 @@ public class Island {
|
||||
* Resets the flags to their default as set in config.yml for this island
|
||||
*/
|
||||
public void setFlagsDefaults(){
|
||||
for(SettingsFlag flag : SettingsFlag.values()){
|
||||
/*for(SettingsFlag flag : SettingsFlag.values()){
|
||||
this.flags.put(flag, Settings.defaultIslandSettings.get(flag));
|
||||
}
|
||||
}*/ //TODO default flags
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the flags to their default as set in config.yml for the spawn
|
||||
*/
|
||||
public void setSpawnFlagsDefaults(){
|
||||
for(SettingsFlag flag : SettingsFlag.values()){
|
||||
/*for(SettingsFlag flag : SettingsFlag.values()){
|
||||
this.flags.put(flag, Settings.defaultSpawnSettings.get(flag));
|
||||
}
|
||||
}*/ //TODO default flags
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,7 @@ public class Players {
|
||||
this.uuid = uuid;
|
||||
this.homeLocations = new HashMap<Integer,Location>();
|
||||
this.playerName = "";
|
||||
this.resetsLeft = Settings.defaultResetLimit;
|
||||
this.resetsLeft = Settings.resetLimit;
|
||||
this.locale = "";
|
||||
this.useControlPanel = Settings.useControlPanel;
|
||||
this.kickedList = new HashMap<Location, Date>();
|
||||
@ -186,8 +186,8 @@ public class Players {
|
||||
*/
|
||||
public void setDeaths(int deaths) {
|
||||
this.deaths = deaths;
|
||||
if (this.deaths > Settings.maxDeaths) {
|
||||
this.deaths = Settings.maxDeaths;
|
||||
if (this.deaths > Settings.deathsMax) {
|
||||
this.deaths = Settings.deathsMax;
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,8 +196,8 @@ public class Players {
|
||||
*/
|
||||
public void addDeath() {
|
||||
this.deaths++;
|
||||
if (this.deaths > Settings.maxDeaths) {
|
||||
this.deaths = Settings.maxDeaths;
|
||||
if (this.deaths > Settings.deathsMax) {
|
||||
this.deaths = Settings.deathsMax;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user