diff --git a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java index f2ea9e8..f0d779f 100644 --- a/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -31,6 +31,7 @@ import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import me.ryanhamshire.GriefPrevention.DataStore.NoTransferException; import net.milkbowl.vault.economy.Economy; import org.bukkit.ChatColor; @@ -1033,10 +1034,10 @@ public class GriefPrevention extends JavaPlugin { this.dataStore.changeClaimOwner(claim, newOwnerID); } - catch(Exception e) + catch(NoTransferException e) { GriefPrevention.sendMessage(player, TextMode.Instr, Messages.TransferTopLevel); - return true; + return true; } //confirm diff --git a/src/me/ryanhamshire/GriefPrevention/PlayerData.java b/src/me/ryanhamshire/GriefPrevention/PlayerData.java index 098b7c1..04972ad 100644 --- a/src/me/ryanhamshire/GriefPrevention/PlayerData.java +++ b/src/me/ryanhamshire/GriefPrevention/PlayerData.java @@ -292,15 +292,16 @@ public class PlayerData int totalBlocks = this.accruedClaimBlocks + this.getBonusClaimBlocks() + GriefPrevention.instance.dataStore.getGroupBonusBlocks(this.playerID); if(totalBlocks < totalClaimsArea) { - Player player = GriefPrevention.instance.getServer().getPlayer(this.playerID); - GriefPrevention.AddLogEntry(player.getName() + "has more claimed land than blocks available. Adding blocks to fix.", CustomLogEntryTypes.Debug); - GriefPrevention.AddLogEntry("Total blocks: " + totalBlocks + " Total claimed area: " + totalClaimsArea, CustomLogEntryTypes.Debug); + OfflinePlayer player = GriefPrevention.instance.getServer().getOfflinePlayer(this.playerID); + GriefPrevention.AddLogEntry(player.getName() + "has more claimed land than blocks available. Adding blocks to fix.", CustomLogEntryTypes.Debug, true); + GriefPrevention.AddLogEntry("Total blocks: " + totalBlocks + " Total claimed area: " + totalClaimsArea, CustomLogEntryTypes.Debug, true); for(Claim claim : this.claims) { GriefPrevention.AddLogEntry( GriefPrevention.getfriendlyLocationString(claim.getLesserBoundaryCorner()) + " // " + GriefPrevention.getfriendlyLocationString(claim.getGreaterBoundaryCorner()) + " = " - + claim.getArea()); + + claim.getArea() + , CustomLogEntryTypes.Debug, true); } //try to fix it by adding to accrued blocks