Fixed break crash
This commit is contained in:
parent
330756e5a7
commit
fdc21d8de5
2 changed files with 10 additions and 4 deletions
|
@ -1501,8 +1501,15 @@ public final class MekanismUtils
|
|||
* @param player - player to check
|
||||
* @return if the player has operator privileges
|
||||
*/
|
||||
public static boolean isOp(EntityPlayerMP player)
|
||||
public static boolean isOp(EntityPlayer p)
|
||||
{
|
||||
if(!(p instanceof EntityPlayerMP))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
EntityPlayerMP player = (EntityPlayerMP)p;
|
||||
|
||||
return general.opsBypassRestrictions && player.mcServer.getConfigurationManager().func_152596_g(player.getGameProfile());
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ import mekanism.common.security.ISecurityTile.SecurityMode;
|
|||
import mekanism.common.security.SecurityData;
|
||||
import mekanism.common.security.SecurityFrequency;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
|
@ -35,7 +34,7 @@ public final class SecurityUtils
|
|||
|
||||
ISecurityItem security = (ISecurityItem)stack.getItem();
|
||||
|
||||
if(MekanismUtils.isOp((EntityPlayerMP)player))
|
||||
if(MekanismUtils.isOp(player))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -52,7 +51,7 @@ public final class SecurityUtils
|
|||
|
||||
ISecurityTile security = (ISecurityTile)tile;
|
||||
|
||||
if(MekanismUtils.isOp((EntityPlayerMP)player))
|
||||
if(MekanismUtils.isOp(player))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue