mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-18 08:35:25 +01:00
Uncancel interact event on shop open
This commit is contained in:
parent
57ba92c71b
commit
6d1274ef18
@ -68,9 +68,7 @@ public class ChestInteractListener implements Listener {
|
|||||||
} else if (flag instanceof OpenFlag) {
|
} else if (flag instanceof OpenFlag) {
|
||||||
ShopOpenEvent event = new ShopOpenEvent(player, shop);
|
ShopOpenEvent event = new ShopOpenEvent(player, shop);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
if (event.isCancelled()) {
|
e.setCancelled(event.isCancelled());
|
||||||
e.setCancelled(true);
|
|
||||||
}
|
|
||||||
} else if (flag instanceof CreateFlag) {
|
} else if (flag instanceof CreateFlag) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
player.sendMessage("§cThis chest already is a shop."); // TODO: i18n
|
player.sendMessage("§cThis chest already is a shop."); // TODO: i18n
|
||||||
|
Loading…
Reference in New Issue
Block a user