Fixed the share commands not working without OP permissions (cheats enabled in singleplayer).

This commit is contained in:
Lizbeth Rika committed 2014-10-03 19:19:45 +01:00
1 parent 31a4aa79c4
commit 094b59c592
2 files changed
+22

No files matched your search

@@ -43,5 +43,16 @@ public class CommandOpen extends CommandBase {
} else sender.addChatMessage(new ChatComponentTranslation("botaniamisc.noLexicon").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
}
}
@Override
public int getRequiredPermissionLevel() {
return 0;
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender p_71519_1_) {
return p_71519_1_ instanceof EntityPlayer;
}
}
@@ -13,6 +13,7 @@ package vazkii.botania.common.core.command;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.StatCollector;
@@ -40,4 +41,14 @@ public class CommandShare extends CommandBase {
MinecraftServer.getServer().getConfigurationManager().sendChatMsg(component);
}
@Override
public int getRequiredPermissionLevel() {
return 0;
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender p_71519_1_) {
return p_71519_1_ instanceof EntityPlayer;
}
}