API tweak for back compat, adjusted blocks delivery.

(Block delivery wouldn't turn off with a /gpreload, only a full
/reload).
This commit is contained in:
ryanhamshire 2014-12-02 15:08:15 -08:00
parent 808b0757bb
commit 0bd36427c7
2 changed files with 6 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class DeliverClaimBlocksTask implements Runnable
public void run() public void run()
{ {
//if no player specified, this task will create a player-specific task for each online player, scheduled one tick apart //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<Player> players = (Collection<Player>)GriefPrevention.instance.getServer().getOnlinePlayers(); Collection<Player> players = (Collection<Player>)GriefPrevention.instance.getServer().getOnlinePlayers();

View File

@ -2498,6 +2498,11 @@ public class GriefPrevention extends JavaPlugin
return this.config_claims_worldModes.get((location.getWorld())) == ClaimsMode.Creative; 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) public String allowBuild(Player player, Location location, Material material)
{ {
PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId()); PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId());