Configurable siege resecure time (#203)
* Configurable time until sieged claim is resecured Fixes #113. Makes the five minute period after winning a siege, during which the claim is not secured, customizable.
This commit is contained in:
parent
a23703707b
commit
5f6b541af8
|
|
@ -1059,7 +1059,10 @@ public abstract class DataStore
|
|||
|
||||
//schedule a task to secure the claims in about 5 minutes
|
||||
SecureClaimTask task = new SecureClaimTask(siegeData);
|
||||
GriefPrevention.instance.getServer().getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, 20L * 60 * 5);
|
||||
|
||||
GriefPrevention.instance.getServer().getScheduler().scheduleSyncDelayedTask(
|
||||
GriefPrevention.instance, task, 20L * GriefPrevention.instance.config_siege_doorsOpenSeconds
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1533,7 +1536,7 @@ public abstract class DataStore
|
|||
this.addDefault(defaults, Messages.AbandonClaimAdvertisement, "To delete another claim and free up some blocks, use /AbandonClaim.", null);
|
||||
this.addDefault(defaults, Messages.CreateClaimFailOverlapShort, "Your selected area overlaps an existing claim.", null);
|
||||
this.addDefault(defaults, Messages.CreateClaimSuccess, "Claim created! Use /trust to share it with friends.", null);
|
||||
this.addDefault(defaults, Messages.SiegeWinDoorsOpen, "Congratulations! Buttons and levers are temporarily unlocked (five minutes).", null);
|
||||
this.addDefault(defaults, Messages.SiegeWinDoorsOpen, "Congratulations! Buttons and levers are temporarily unlocked.", null);
|
||||
this.addDefault(defaults, Messages.RescueAbortedMoved, "You moved! Rescue cancelled.", null);
|
||||
this.addDefault(defaults, Messages.SiegeDoorsLockedEjection, "Looting time is up! Ejected from the claim.", null);
|
||||
this.addDefault(defaults, Messages.NoModifyDuringSiege, "Claims can't be modified while under siege.", null);
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
|
||||
public ArrayList<World> config_siege_enabledWorlds; //whether or not /siege is enabled on this server
|
||||
public ArrayList<Material> config_siege_blocks; //which blocks will be breakable in siege mode
|
||||
public int config_siege_doorsOpenSeconds; // how before claim is re-secured after siege win
|
||||
|
||||
public boolean config_spam_enabled; //whether or not to monitor for spam
|
||||
public int config_spam_loginCooldownSeconds; //how long players must wait between logins. combats login spam.
|
||||
|
|
@ -746,6 +747,8 @@ public class GriefPrevention extends JavaPlugin
|
|||
}
|
||||
}
|
||||
|
||||
this.config_siege_doorsOpenSeconds = config.getInt("GriefPrevention.Siege.DoorsOpenDelayInSeconds", 5*60);
|
||||
|
||||
this.config_pvp_noCombatInPlayerLandClaims = config.getBoolean("GriefPrevention.PvP.ProtectPlayersInLandClaims.PlayerOwnedClaims", this.config_siege_enabledWorlds.size() == 0);
|
||||
this.config_pvp_noCombatInAdminLandClaims = config.getBoolean("GriefPrevention.PvP.ProtectPlayersInLandClaims.AdministrativeClaims", this.config_siege_enabledWorlds.size() == 0);
|
||||
this.config_pvp_noCombatInAdminSubdivisions = config.getBoolean("GriefPrevention.PvP.ProtectPlayersInLandClaims.AdministrativeSubdivisions", this.config_siege_enabledWorlds.size() == 0);
|
||||
|
|
@ -877,6 +880,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
|
||||
outConfig.set("GriefPrevention.Siege.Worlds", siegeEnabledWorldNames);
|
||||
outConfig.set("GriefPrevention.Siege.BreakableBlocks", breakableBlocksList);
|
||||
outConfig.set("GriefPrevention.Siege.DoorsOpenDelayInSeconds", this.config_siege_doorsOpenSeconds);
|
||||
|
||||
outConfig.set("GriefPrevention.EndermenMoveBlocks", this.config_endermenMoveBlocks);
|
||||
outConfig.set("GriefPrevention.SilverfishBreakBlocks", this.config_silverfishBreakBlocks);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user