Skip to content

Commit deebf12

Browse files
[1.20.x] Cancel for interacting with sign (editing)
1 parent b487daa commit deebf12

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/maxgamer/quickshop/listener/PlayerListener.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import org.maxgamer.quickshop.api.shop.Shop;
5555
import org.maxgamer.quickshop.api.shop.ShopAction;
5656
import org.maxgamer.quickshop.shop.SimpleInfo;
57+
import org.maxgamer.quickshop.util.GameVersion;
5758
import org.maxgamer.quickshop.util.InteractUtil;
5859
import org.maxgamer.quickshop.util.MsgUtil;
5960
import org.maxgamer.quickshop.util.PermissionChecker;
@@ -169,6 +170,10 @@ private void postControlPanel(PlayerInteractEvent e) {
169170
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
170171
e.setUseItemInHand(Event.Result.DENY);
171172
}
173+
//Cancel for interacting with sign (editing)
174+
if (plugin.getGameVersion().ordinal() >= GameVersion.v1_20_R1.ordinal()) {
175+
e.setCancelled(true);
176+
}
172177
}
173178
}
174179
}

0 commit comments

Comments
 (0)