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)
|
||||
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
|
||||
getFriendsFeature().clearFriends();
|
||||
UUID oldBuyer = getBuyer();
|
||||
setBuyer(null);
|
||||
removeLastActiveTime();
|
||||
|
||||
message(executor, "sell-sold");
|
||||
|
||||
// Notify about updates
|
||||
this.notifyAndUpdate(new SoldRegionEvent(this, oldBuyer, Math.max(moneyBack, 0)));
|
||||
return true;
|
||||
|
|
|
@ -694,6 +694,9 @@ public class RentRegion extends GeneralRegion {
|
|||
// Handle schematic save/restore (while %uuid% is still available)
|
||||
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
|
||||
getFriendsFeature().clearFriends();
|
||||
UUID oldRenter = getRenter();
|
||||
|
@ -702,9 +705,6 @@ public class RentRegion extends GeneralRegion {
|
|||
setTimesExtended(-1);
|
||||
removeLastActiveTime();
|
||||
|
||||
// Send messages
|
||||
message(executor, "unrent-unrented");
|
||||
|
||||
// Notify about updates
|
||||
this.notifyAndUpdate(new UnrentedRegionEvent(this, oldRenter, Math.max(0, moneyBack)));
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue