Fixed error message /transferclaim offline player.
This commit is contained in:
parent
baf29ae38f
commit
bdf720281e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user