mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-26 06:53:01 +00:00
Commands are now usable in SP
Updated to match new API from MobiusCore
This commit is contained in:
1 parent
ac03ca45d7
commit
d70133caa8
6 files changed
+13
-3
No files matched your search
@@ -8,6 +8,7 @@ import mcp.mobius.opis.network.server.Packet_ChunkTopList;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.MemoryConnection;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
|
||||
@@ -55,6 +56,7 @@ public class CommandChunkList extends CommandBase {
|
||||
public boolean canCommandSenderUseCommand(ICommandSender sender)
|
||||
{
|
||||
if (sender instanceof DedicatedServer) return false;
|
||||
if (((EntityPlayerMP)sender).playerNetServerHandler.netManager instanceof MemoryConnection) return true;
|
||||
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import mcp.mobius.opis.modOpis;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.MemoryConnection;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
|
||||
@@ -38,6 +39,7 @@ public class CommandFrequency extends CommandBase {
|
||||
public boolean canCommandSenderUseCommand(ICommandSender sender)
|
||||
{
|
||||
if (sender instanceof DedicatedServer) return true;
|
||||
if (((EntityPlayerMP)sender).playerNetServerHandler.netManager instanceof MemoryConnection) return true;
|
||||
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import mcp.mobius.opis.modOpis;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.MemoryConnection;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
|
||||
@@ -34,7 +35,8 @@ public class CommandStart extends CommandBase {
|
||||
@Override
|
||||
public boolean canCommandSenderUseCommand(ICommandSender sender)
|
||||
{
|
||||
if (sender instanceof DedicatedServer) return true;
|
||||
if (sender instanceof DedicatedServer) return true;
|
||||
if (((EntityPlayerMP)sender).playerNetServerHandler.netManager instanceof MemoryConnection) return true;
|
||||
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import mcp.mobius.opis.modOpis;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.MemoryConnection;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
|
||||
@@ -35,6 +36,7 @@ public class CommandStop extends CommandBase {
|
||||
public boolean canCommandSenderUseCommand(ICommandSender sender)
|
||||
{
|
||||
if (sender instanceof DedicatedServer) return true;
|
||||
if (((EntityPlayerMP)sender).playerNetServerHandler.netManager instanceof MemoryConnection) return true;
|
||||
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import mcp.mobius.opis.network.server.Packet_TileEntitiesTopList;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.MemoryConnection;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
|
||||
@@ -49,6 +50,7 @@ public class CommandTileEntitiesList extends CommandBase {
|
||||
public boolean canCommandSenderUseCommand(ICommandSender sender)
|
||||
{
|
||||
if (sender instanceof DedicatedServer) return false;
|
||||
if (((EntityPlayerMP)sender).playerNetServerHandler.netManager instanceof MemoryConnection) return true;
|
||||
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ public class TileEntityProfiler implements IProfilerTileEntity {
|
||||
private Clock clock = new Clock();
|
||||
|
||||
@Override
|
||||
public void FullTEStart() { }
|
||||
public void FullTileEntityStart() { }
|
||||
|
||||
@Override
|
||||
public void FullTEStop() { }
|
||||
public void FullTileEntityStop() { }
|
||||
|
||||
@Override
|
||||
public void Start(TileEntity te) {
|
||||
|
||||
Reference in new issue
Block a user