List of usage examples for net.minecraftforge.server.permission.context BlockPosContext BlockPosContext
public BlockPosContext(PlayerEntity ep, BlockPos pos, @Nullable BlockState state, @Nullable Direction f)
From source file:com.lothrazar.cyclicmagic.registry.PermissionRegistry.java
License:Open Source License
public static boolean hasPermissionHere(EntityPlayer player, BlockPos pos) { if (player.world.isRemote) { return true;//Do not check permissions on client side! can crash or go crazy }//from w w w. ja v a 2 s . c o m return PermissionAPI.hasPermission(player.getGameProfile(), MODIFYBLOCKS, new BlockPosContext(player, pos, null, null)); }