From 0bd36427c7feb4a83a52a2326b3262a8ca61b442 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Tue, 2 Dec 2014 15:08:15 -0800 Subject: [PATCH] API tweak for back compat, adjusted blocks delivery. (Block delivery wouldn't turn off with a /gpreload, only a full /reload). --- .../ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java | 2 +- src/me/ryanhamshire/GriefPrevention/GriefPrevention.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java b/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java index 854b3dd..3fc34e4 100644 --- a/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java +++ b/src/me/ryanhamshire/GriefPrevention/DeliverClaimBlocksTask.java @@ -39,7 +39,7 @@ class DeliverClaimBlocksTask implements Runnable public void run() { //if no player specified, this task will create a player-specific task for each online player, scheduled one tick apart - if(this.player == null) + if(this.player == null && GriefPrevention.instance.config_claims_blocksAccruedPerHour > 0) { Collection players = (Collection)GriefPrevention.instance.getServer().getOnlinePlayers(); diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index 8d7a080..c197b58 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -2498,6 +2498,11 @@ public class GriefPrevention extends JavaPlugin return this.config_claims_worldModes.get((location.getWorld())) == ClaimsMode.Creative; } + public String allowBuild(Player player, Location location) + { + return this.allowBuild(player, location, location.getBlock().getType()); + } + public String allowBuild(Player player, Location location, Material material) { PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId());