Fixed conflicts. Removed "y" variable in Island as it is useless.

This commit is contained in:
Poslovitch 2017-05-21 10:20:07 +02:00
parent 6d0611f717
commit 251c2e92f2
6 changed files with 30 additions and 18 deletions

View File

@ -268,7 +268,7 @@ island:
# Accessed via sethome <number> or go <number> # Accessed via sethome <number> or go <number>
# Use this permission to set for specific user groups: askyblock.island.maxhomes.<number> # Use this permission to set for specific user groups: askyblock.island.maxhomes.<number>
max-homes: 1 max-homes: 1
# Island naming # Island naming
# Only players with the TODO can name their island # Only players with the TODO can name their island
# It is displayed in the top ten and enter and exit announcements # It is displayed in the top ten and enter and exit announcements
@ -399,6 +399,16 @@ island:
reset: true reset: true
reset-wait: 10 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 Settings ###
protection: protection:

View File

@ -72,7 +72,7 @@ public class BSkyBlock extends JavaPlugin{
islandsManager.save(true); islandsManager.save(true);
offlineHistoryMessages.save(true); offlineHistoryMessages.save(true);
} }
}, Settings.backupPeriod, Settings.backupPeriod); }, Settings.databaseBackupPeriod, Settings.databaseBackupPeriod);
} }
@Override @Override

View File

@ -349,12 +349,12 @@ public class IslandCommand extends BSBCommand{
} }
// Check if the name isn't too short or too long // Check if the name isn't too short or too long
if(name.length() < Settings.minIslandNameLength){ if(name.length() < Settings.nameMinLength){
Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooShort.replace("[length]", String.valueOf(Settings.minIslandNameLength))); Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooShort.replace("[length]", String.valueOf(Settings.nameMinLength)));
return; return;
} }
if(name.length() > Settings.maxIslandNameLength){ if(name.length() > Settings.nameMaxLength){
Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooLong.replace("[length]", String.valueOf(Settings.maxIslandNameLength))); Util.sendMessage(player, ChatColor.RED + plugin.getLocale(player).errorTooLong.replace("[length]", String.valueOf(Settings.nameMaxLength)));
return; return;
} }

View File

@ -49,7 +49,7 @@ public class Settings {
/* WORLD */ /* WORLD */
public static String worldName; public static String worldName;
public static int distance; public static int islandDistance;
public static int protectionRange; public static int protectionRange;
public static int startX; public static int startX;
public static int startZ; public static int startZ;
@ -117,6 +117,10 @@ public class Settings {
public static boolean confirmReset; public static boolean confirmReset;
public static int confirmResetWait; public static int confirmResetWait;
// Deaths
public static int deathsMax;
public static boolean deathsSumTeam;
/* PROTECTION */ /* PROTECTION */
public static boolean allowPistonPush; public static boolean allowPistonPush;
public static boolean restrictWither; public static boolean restrictWither;

View File

@ -38,8 +38,6 @@ public class Island {
private int minProtectedZ; private int minProtectedZ;
// Protection size // Protection size
private int protectionRange; private int protectionRange;
// Height of island
private int y;
// World the island is in // World the island is in
private World world; private World world;
@ -582,18 +580,18 @@ public class Island {
* Resets the flags to their default as set in config.yml for this island * Resets the flags to their default as set in config.yml for this island
*/ */
public void setFlagsDefaults(){ public void setFlagsDefaults(){
for(SettingsFlag flag : SettingsFlag.values()){ /*for(SettingsFlag flag : SettingsFlag.values()){
this.flags.put(flag, Settings.defaultIslandSettings.get(flag)); 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 * Resets the flags to their default as set in config.yml for the spawn
*/ */
public void setSpawnFlagsDefaults(){ public void setSpawnFlagsDefaults(){
for(SettingsFlag flag : SettingsFlag.values()){ /*for(SettingsFlag flag : SettingsFlag.values()){
this.flags.put(flag, Settings.defaultSpawnSettings.get(flag)); this.flags.put(flag, Settings.defaultSpawnSettings.get(flag));
} }*/ //TODO default flags
} }
/** /**

View File

@ -36,7 +36,7 @@ public class Players {
this.uuid = uuid; this.uuid = uuid;
this.homeLocations = new HashMap<Integer,Location>(); this.homeLocations = new HashMap<Integer,Location>();
this.playerName = ""; this.playerName = "";
this.resetsLeft = Settings.defaultResetLimit; this.resetsLeft = Settings.resetLimit;
this.locale = ""; this.locale = "";
this.useControlPanel = Settings.useControlPanel; this.useControlPanel = Settings.useControlPanel;
this.kickedList = new HashMap<Location, Date>(); this.kickedList = new HashMap<Location, Date>();
@ -186,8 +186,8 @@ public class Players {
*/ */
public void setDeaths(int deaths) { public void setDeaths(int deaths) {
this.deaths = deaths; this.deaths = deaths;
if (this.deaths > Settings.maxDeaths) { if (this.deaths > Settings.deathsMax) {
this.deaths = Settings.maxDeaths; this.deaths = Settings.deathsMax;
} }
} }
@ -196,8 +196,8 @@ public class Players {
*/ */
public void addDeath() { public void addDeath() {
this.deaths++; this.deaths++;
if (this.deaths > Settings.maxDeaths) { if (this.deaths > Settings.deathsMax) {
this.deaths = Settings.maxDeaths; this.deaths = Settings.deathsMax;
} }
} }