Added Permission Checks for Pretty much all the tools.

This commit is contained in:
AlgorithmX2
2014-08-28 22:32:53 -05:00
parent a0f5f9dcd5
commit fbab9f15ee
5 changed files with 20 additions and 3 deletions
+5 -1
View File
@@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.items.IAEWrench;
import appeng.api.util.DimensionalCoord;
import appeng.core.features.AEFeature;
import appeng.items.AEBaseItem;
import appeng.transformer.annotations.integration.Interface;
@@ -28,8 +29,11 @@ public class ToolQuartzWrench extends AEBaseItem implements IAEWrench, IToolWren
public boolean onItemUseFirst(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
{
Block b = world.getBlock( x, y, z );
if ( b != null && !player.isSneaking() )
if ( b != null && !player.isSneaking() && Platform.hasPermissions( new DimensionalCoord( world, x, y, z ), player ) )
{
if ( Platform.isClient() )
return true;
ForgeDirection mySide = ForgeDirection.getOrientation( side );
if ( b.rotateBlock( world, x, y, z, mySide ) )
{