mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-24 00:15:16 +01:00
hopefully improved comp with Vault eco
This commit is contained in:
parent
ef80ac265d
commit
d017808fac
@ -1,5 +1,6 @@
|
|||||||
package net.Indyuce.mmocore.gui.eco;
|
package net.Indyuce.mmocore.gui.eco;
|
||||||
|
|
||||||
|
import net.milkbowl.vault.economy.EconomyResponse;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
@ -59,7 +60,10 @@ public class DepositMenu extends PluginInventory {
|
|||||||
if (deposit <= 0)
|
if (deposit <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MMOCore.plugin.economy.getEconomy().depositPlayer(player, deposit);
|
EconomyResponse response = MMOCore.plugin.economy.getEconomy().depositPlayer(player, deposit);
|
||||||
|
if (!response.transactionSuccess())
|
||||||
|
return;
|
||||||
|
|
||||||
event.getInventory().clear();
|
event.getInventory().clear();
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1, 2);
|
player.playSound(player.getLocation(), Sound.ENTITY_PLAYER_LEVELUP, 1, 2);
|
||||||
|
Loading…
Reference in New Issue
Block a user