File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
src/main/java/org/maxgamer/quickshop/listener Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -162,13 +162,15 @@ private void postControlPanel(PlayerInteractEvent e) {
162162 block = e .getClickedBlock ();
163163 }
164164 Shop controlPanelShop = plugin .getShopManager ().getShop (Objects .requireNonNull (block ).getLocation ());
165- if (controlPanelShop != null && (controlPanelShop .getOwner ().equals (p .getUniqueId ()) || QuickShop .getPermissionManager ().hasPermission (p , "quickshop.other.control" ))) {
166- MsgUtil .sendControlPanelInfo (p , Objects .requireNonNull (plugin .getShopManager ().getShop (block .getLocation ())));
167- this .playClickSound (e .getPlayer ());
168- Objects .requireNonNull (plugin .getShopManager ().getShop (block .getLocation ())).setSignText ();
169- //Prevent use item by ancient
170- if (e .getAction () == Action .RIGHT_CLICK_BLOCK ) {
171- e .setUseItemInHand (Event .Result .DENY );
165+ if (controlPanelShop != null ) {
166+ if ((controlPanelShop .getOwner ().equals (p .getUniqueId ()) || QuickShop .getPermissionManager ().hasPermission (p , "quickshop.other.control" ))) {
167+ MsgUtil .sendControlPanelInfo (p , Objects .requireNonNull (plugin .getShopManager ().getShop (block .getLocation ())));
168+ this .playClickSound (e .getPlayer ());
169+ Objects .requireNonNull (plugin .getShopManager ().getShop (block .getLocation ())).setSignText ();
170+ //Prevent use item by ancient
171+ if (e .getAction () == Action .RIGHT_CLICK_BLOCK ) {
172+ e .setUseItemInHand (Event .Result .DENY );
173+ }
172174 }
173175 //Cancel for interacting with sign (editing)
174176 if (plugin .getGameVersion ().ordinal () >= GameVersion .v1_20_R1 .ordinal ()) {
You can’t perform that action at this time.
0 commit comments