fix interactions
Some checks failed
/ Auto-Build-App (push) Failing after 1m17s

This commit is contained in:
pietru 2025-01-07 23:25:37 +01:00
parent 97561ced0d
commit 5d75207b39

View file

@ -36,7 +36,9 @@ public class InteractBlockMixin {
private void event_block_interact(CallbackInfo ci, @Local NetworkIdentity identity, @Local ChannelHandlerContext ctx){
if (identity.getSide() != NetworkSide.CLIENT) {
Account account = ServerSingletons.getAccount(identity);
if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_edit_block(blockPos,"interact",account.getUniqueId())) {
BlockPosition temp = blockPos.copy();
temp.convertToLocal(identity.getZone());
if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_edit_block(temp,"interact",account.getUniqueId())) {
ci.cancel();
MessagePacket packet = new MessagePacket("[Server] " + (is_not_reloading ? "Sorry, but this area is under protection." : "Sorry but you can't do this action right now. [Config Reload In Progress]"));