Updated op code

This commit is contained in:
Sekwah 2018-07-23 01:14:36 +01:00
parent a9b9c89422
commit 339e12dd0c
1 changed files with 12 additions and 12 deletions

View File

@ -30,11 +30,11 @@ public class ForgeCommandSenderContainer implements CommandSenderContainer {
else {
UserListOpsEntry userlistopsentry = FMLCommonHandler.instance().getMinecraftServerInstance()
.getPlayerList().getOppedPlayers().getEntry(((EntityPlayer) this.sender).getGameProfile());
// Intellij may say this will always be true but it isn't
if (userlistopsentry != null) {
return userlistopsentry.getPermissionLevel() >= 2;
} else {
return FMLCommonHandler.instance().getMinecraftServerInstance().getOpPermissionLevel()
>= 2;
return FMLCommonHandler.instance().getMinecraftServerInstance().getOpPermissionLevel() >= 2;
}
}