Fix shop removal

This commit is contained in:
Eric 2020-03-21 18:42:59 +01:00
parent c844dffc14
commit cce4b80a80

View File

@ -85,7 +85,7 @@ public class ShopInteractMonitorListener implements Listener {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onShopRemove(ShopRemoveEvent e) { public void onShopRemove(ShopRemoveEvent e) {
((ShopChestImpl) plugin).getDatabase().removeShop(e.getShop()) plugin.getShopManager().removeShop(e.getShop())
.thenRun(() -> e.getPlayer().sendMessage("§aShop has been removed.")) // TODO: i18n .thenRun(() -> e.getPlayer().sendMessage("§aShop has been removed.")) // TODO: i18n
.exceptionally(ex -> { .exceptionally(ex -> {
Logger.severe("Failed to remove shop"); Logger.severe("Failed to remove shop");