Resell quickshops to new shop owner upon transfer
This commit is contained in:
1 parent
b1d58052e4
commit
61f411ee03
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -33,7 +33,7 @@ val commitHash =
|
||||
|
||||
group = "nl.skbotnl.shopbridge-og" // Declare bundle identifier.
|
||||
|
||||
version = "1.1.6" // Declare plugin version (will be in .jar).
|
||||
version = "1.1.7" // Declare plugin version (will be in .jar).
|
||||
|
||||
val apiVersion = "1.19" // Declare minecraft server target version.
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ class Main : JavaPlugin(), Listener {
|
||||
removeShopsIn(event.region, wipeStock = true)
|
||||
}
|
||||
|
||||
// Ownership moves straight from one player to another, so the stock stays behind for the buyer.
|
||||
// Ownership moves straight from one player to another, so the shops and their stock follow the plot.
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
fun onRegionResold(event: ResoldRegionEvent) {
|
||||
removeShopsIn(event.region, wipeStock = false)
|
||||
transferShopsIn(event.region, event.region.owner ?: return)
|
||||
}
|
||||
|
||||
// A player handed the plot to another player, so the shops follow the plot.
|
||||
|
||||
Reference in new issue
Block a user