BuyRegion/RentRegion: fix %player% placeholders for selling/unrenting confirmation messages
This commit is contained in:
parent
41ced9ee6c
commit
fe131dc157
|
@ -526,14 +526,15 @@ public class BuyRegion extends GeneralRegion {
|
||||||
// Handle schematic save/restore (while %uuid% is still available)
|
// Handle schematic save/restore (while %uuid% is still available)
|
||||||
handleSchematicEvent(RegionEvent.SOLD);
|
handleSchematicEvent(RegionEvent.SOLD);
|
||||||
|
|
||||||
|
// Send message: before actual removal of the buyer so that it is still available for variables
|
||||||
|
message(executor, "sell-sold");
|
||||||
|
|
||||||
// Remove friends and the owner
|
// Remove friends and the owner
|
||||||
getFriendsFeature().clearFriends();
|
getFriendsFeature().clearFriends();
|
||||||
UUID oldBuyer = getBuyer();
|
UUID oldBuyer = getBuyer();
|
||||||
setBuyer(null);
|
setBuyer(null);
|
||||||
removeLastActiveTime();
|
removeLastActiveTime();
|
||||||
|
|
||||||
message(executor, "sell-sold");
|
|
||||||
|
|
||||||
// Notify about updates
|
// Notify about updates
|
||||||
this.notifyAndUpdate(new SoldRegionEvent(this, oldBuyer, Math.max(moneyBack, 0)));
|
this.notifyAndUpdate(new SoldRegionEvent(this, oldBuyer, Math.max(moneyBack, 0)));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -694,6 +694,9 @@ public class RentRegion extends GeneralRegion {
|
||||||
// Handle schematic save/restore (while %uuid% is still available)
|
// Handle schematic save/restore (while %uuid% is still available)
|
||||||
handleSchematicEvent(RegionEvent.UNRENTED);
|
handleSchematicEvent(RegionEvent.UNRENTED);
|
||||||
|
|
||||||
|
// Send message: before actual removal of the renter so that it is still available for variables
|
||||||
|
message(executor, "unrent-unrented");
|
||||||
|
|
||||||
// Remove friends, the owner and renteduntil values
|
// Remove friends, the owner and renteduntil values
|
||||||
getFriendsFeature().clearFriends();
|
getFriendsFeature().clearFriends();
|
||||||
UUID oldRenter = getRenter();
|
UUID oldRenter = getRenter();
|
||||||
|
@ -702,9 +705,6 @@ public class RentRegion extends GeneralRegion {
|
||||||
setTimesExtended(-1);
|
setTimesExtended(-1);
|
||||||
removeLastActiveTime();
|
removeLastActiveTime();
|
||||||
|
|
||||||
// Send messages
|
|
||||||
message(executor, "unrent-unrented");
|
|
||||||
|
|
||||||
// Notify about updates
|
// Notify about updates
|
||||||
this.notifyAndUpdate(new UnrentedRegionEvent(this, oldRenter, Math.max(0, moneyBack)));
|
this.notifyAndUpdate(new UnrentedRegionEvent(this, oldRenter, Math.max(0, moneyBack)));
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue