mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-16 23:55:23 +01:00
Updated op code
This commit is contained in:
parent
a9b9c89422
commit
339e12dd0c
@ -24,19 +24,19 @@ public class ForgeCommandSenderContainer implements CommandSenderContainer {
|
||||
public boolean isOp() {
|
||||
if(this.sender.getCommandSenderEntity() instanceof EntityPlayer) {
|
||||
|
||||
if(!FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().canSendCommands(((EntityPlayer) this.sender).getGameProfile())) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
UserListOpsEntry userlistopsentry = FMLCommonHandler.instance().getMinecraftServerInstance()
|
||||
.getPlayerList().getOppedPlayers().getEntry(((EntityPlayer) this.sender).getGameProfile());
|
||||
if (userlistopsentry != null) {
|
||||
return userlistopsentry.getPermissionLevel() >= 2;
|
||||
} else {
|
||||
return FMLCommonHandler.instance().getMinecraftServerInstance().getOpPermissionLevel()
|
||||
>= 2;
|
||||
if(!FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().canSendCommands(((EntityPlayer) this.sender).getGameProfile())) {
|
||||
return false;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user