This commit is contained in:
parent
471da14bab
commit
72444d2550
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue