Add ShopBalance to the player when shop is broken.

This commit is contained in:
Len 2022-09-01 10:43:22 +02:00
parent 0d79b75e33
commit 858162165f

View File

@ -4,6 +4,7 @@ import com.alttd.playershops.PlayerShops;
import com.alttd.playershops.config.MessageConfig;
import com.alttd.playershops.handler.ShopHandler;
import com.alttd.playershops.shop.PlayerShop;
import com.alttd.playershops.utils.EconomyUtils;
import com.destroystokyo.paper.MaterialSetTag;
import org.bukkit.Location;
import org.bukkit.Material;
@ -141,6 +142,9 @@ public class ShopListener extends EventListener {
return;
}
// currently goes to breaking player, but this should go to owning player at one point
EconomyUtils.addFunds(player, shop.getBalance());
shopHandler.removeShop(shop);
}