Config option for claim book delivery timing.
This commit is contained in:
parent
38362a3547
commit
78fbe3a389
|
|
@ -114,6 +114,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
|
||||
public ArrayList<String> config_claims_commandsRequiringAccessTrust; //the list of slash commands requiring access trust when in a claim
|
||||
public boolean config_claims_supplyPlayerManual; //whether to give new players a book with land claim help in it
|
||||
public int config_claims_manualDeliveryDelaySeconds; //how long to wait before giving a book to a new player
|
||||
|
||||
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
|
||||
|
|
@ -523,6 +524,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
this.config_claims_villagerTradingRequiresTrust = config.getBoolean("GriefPrevention.Claims.VillagerTradingRequiresPermission", true);
|
||||
String accessTrustSlashCommands = config.getString("GriefPrevention.Claims.CommandsRequiringAccessTrust", "/sethome");
|
||||
this.config_claims_supplyPlayerManual = config.getBoolean("GriefPrevention.Claims.DeliverManuals", true);
|
||||
this.config_claims_manualDeliveryDelaySeconds = config.getInt("GriefPrevention.Claims.ManualDeliveryDelaySeconds", 30);
|
||||
|
||||
this.config_spam_enabled = config.getBoolean("GriefPrevention.Spam.Enabled", true);
|
||||
this.config_spam_loginCooldownSeconds = config.getInt("GriefPrevention.Spam.LoginCooldownSeconds", 60);
|
||||
|
|
@ -754,6 +756,7 @@ public class GriefPrevention extends JavaPlugin
|
|||
outConfig.set("GriefPrevention.Claims.VillagerTradingRequiresPermission", this.config_claims_villagerTradingRequiresTrust);
|
||||
outConfig.set("GriefPrevention.Claims.CommandsRequiringAccessTrust", accessTrustSlashCommands);
|
||||
outConfig.set("GriefPrevention.Claims.DeliverManuals", config_claims_supplyPlayerManual);
|
||||
outConfig.set("GriefPrevention.Claims.ManualDeliveryDelaySeconds", config_claims_manualDeliveryDelaySeconds);
|
||||
|
||||
outConfig.set("GriefPrevention.Spam.Enabled", this.config_spam_enabled);
|
||||
outConfig.set("GriefPrevention.Spam.LoginCooldownSeconds", this.config_spam_loginCooldownSeconds);
|
||||
|
|
|
|||
|
|
@ -779,7 +779,7 @@ class PlayerEventHandler implements Listener
|
|||
if(GriefPrevention.instance.config_claims_worldModes.get(player.getWorld()) == ClaimsMode.Survival && !player.hasPermission("griefprevention.adminclaims") && this.dataStore.claims.size() > 10)
|
||||
{
|
||||
WelcomeTask task = new WelcomeTask(player);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, 2400L); //2 minutes after join
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(GriefPrevention.instance, task, GriefPrevention.instance.config_claims_manualDeliveryDelaySeconds * 20L);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user