Solved issue #1

Might have solved issue #2
This commit is contained in:
ProfMobius committed 2013-11-10 19:02:11 +01:00
1 parent 6205940df1
commit 9a474fc6ea
7 files changed
+13 -3

No files matched your search

@@ -9,6 +9,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
public class CommandChunkList extends CommandBase {
@@ -53,6 +54,7 @@ public class CommandChunkList extends CommandBase {
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
if (sender instanceof DedicatedServer) return false;
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
}
@@ -5,6 +5,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
public class CommandFrequency extends CommandBase {
@@ -36,6 +37,7 @@ public class CommandFrequency extends CommandBase {
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
if (sender instanceof DedicatedServer) return true;
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
}
@@ -5,6 +5,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
public class CommandStart extends CommandBase {
@@ -33,6 +34,7 @@ public class CommandStart extends CommandBase {
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
if (sender instanceof DedicatedServer) return true;
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
}
@@ -5,6 +5,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
public class CommandStop extends CommandBase {
@@ -33,6 +34,7 @@ public class CommandStop extends CommandBase {
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
if (sender instanceof DedicatedServer) return true;
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
}
@@ -9,6 +9,7 @@ import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
public class CommandTileEntitiesList extends CommandBase {
@@ -47,6 +48,7 @@ public class CommandTileEntitiesList extends CommandBase {
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
if (sender instanceof DedicatedServer) return false;
return MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(((EntityPlayerMP)sender).username);
}
@@ -50,6 +50,8 @@ public class OpisPacketHandler implements IPacketHandler {
if (packet.channel.equals("Opis")) {
byte header = this.getHeader(packet);
if (header == -1) return;
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
this.onPacketToClient(manager, packet, player, header);
@@ -163,8 +165,8 @@ public class OpisPacketHandler implements IPacketHandler {
public byte getHeader(Packet250CustomPayload packet){
DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data));
try{
DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data));
return inputStream.readByte();
} catch (IOException e){
return -1;
-2
View File
@@ -20,6 +20,4 @@ public class Packets {
public static byte TILEENTITIES_TOPLIST = 0x22; // S => C
public static byte REQ_TELEPORT = 0x30; // C => S
}