quick fix
Some checks failed
/ Auto-Build-App (push) Failing after 1m37s

This commit is contained in:
pietru 2025-03-08 19:33:25 +01:00
parent 471da14bab
commit 72444d2550

View file

@ -37,9 +37,11 @@ public class BlockPlaceMixin {
if (targetBlockState instanceof BlockStateMissing)
ci.cancel();
}
BlockPosition temp = blockPos.copy();
temp.convertToLocal(identity.getZone());
if (identity.isServer() && !ci.isCancelled()) {
Account account = ServerSingletons.getAccount(identity);
if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_edit_block(blockPos,"place",account.getUniqueId())) {
if (!Permissions.has_user_special_perm(account.getUniqueId()) && !can_edit_block(temp,"place",account.getUniqueId())) {
ci.cancel();
if (!identity.getPlayer().gamemode.hasInfiniteItems())
identity.getPlayer().inventory.merge(new ItemStack(targetBlockState.getItem()), ItemMergeStrategy.ONLY_ONE_SLOT);