(Continuation of previous.)

This commit is contained in:
ryanhamshire 2015-04-23 21:17:45 -07:00
parent bdf720281e
commit e833a0c361

View File

@ -299,12 +299,19 @@ public abstract class DataStore
abstract void saveGroupBonusBlocks(String groupName, int amount); abstract void saveGroupBonusBlocks(String groupName, int amount);
synchronized public void changeClaimOwner(Claim claim, UUID newOwnerID) throws Exception class NoTransferException extends Exception
{
NoTransferException(String message)
{
super(message);
}
}
synchronized public void changeClaimOwner(Claim claim, UUID newOwnerID) throws NoTransferException
{ {
//if it's a subdivision, throw an exception //if it's a subdivision, throw an exception
if(claim.parent != null) if(claim.parent != null)
{ {
throw new Exception("Subdivisions can't be transferred. Only top-level claims may change owners."); throw new NoTransferException("Subdivisions can't be transferred. Only top-level claims may change owners.");
} }
//otherwise update information //otherwise update information