Added DeluxeSellwands support
This commit is contained in:
@@ -8,4 +8,6 @@ dependencies {
|
||||
compileOnly 'com.willfp:EcoEnchants:8.2.0'
|
||||
compileOnly 'com.willfp:EcoSkills:1.2.4'
|
||||
compileOnly 'com.github.brcdev-minecraft:shopgui-api:2.2.0'
|
||||
|
||||
compileOnly fileTree(dir: '../../lib', include: ['*.jar'])
|
||||
}
|
||||
+14
@@ -3,6 +3,7 @@ package com.willfp.boosters.boosters.boosters
|
||||
import com.willfp.boosters.BoostersPlugin
|
||||
import com.willfp.boosters.activeBooster
|
||||
import com.willfp.boosters.boosters.Booster
|
||||
import dev.norska.dsw.api.DeluxeSellwandSellEvent
|
||||
import net.brcdev.shopgui.event.ShopPreTransactionEvent
|
||||
import net.brcdev.shopgui.shop.ShopManager
|
||||
import org.bukkit.Bukkit
|
||||
@@ -31,4 +32,17 @@ class Booster15SellMultiplier: Booster(
|
||||
|
||||
event.price *= 1.5
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
fun handle(event: DeluxeSellwandSellEvent) {
|
||||
if (Bukkit.getServer().activeBooster != this) {
|
||||
return
|
||||
}
|
||||
|
||||
if (event.isCancelled) {
|
||||
return
|
||||
}
|
||||
|
||||
event.money *= 1.5
|
||||
}
|
||||
}
|
||||
+14
@@ -3,6 +3,7 @@ package com.willfp.boosters.boosters.boosters
|
||||
import com.willfp.boosters.BoostersPlugin
|
||||
import com.willfp.boosters.activeBooster
|
||||
import com.willfp.boosters.boosters.Booster
|
||||
import dev.norska.dsw.api.DeluxeSellwandSellEvent
|
||||
import net.brcdev.shopgui.event.ShopPreTransactionEvent
|
||||
import net.brcdev.shopgui.shop.ShopManager
|
||||
import org.bukkit.Bukkit
|
||||
@@ -31,4 +32,17 @@ class Booster2SellMultiplier: Booster(
|
||||
|
||||
event.price *= 2
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
fun handle(event: DeluxeSellwandSellEvent) {
|
||||
if (Bukkit.getServer().activeBooster != this) {
|
||||
return
|
||||
}
|
||||
|
||||
if (event.isCancelled) {
|
||||
return
|
||||
}
|
||||
|
||||
event.money *= 2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user