package net.silentchaos512.gems.network.message;

import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
import net.minecraftforge.fml.relauncher.Side;
import net.silentchaos512.gems.lib.ChaosBuff;
import net.silentchaos512.gems.network.Message;

public class MessageSetFlight extends Message {

  boolean value;

  public MessageSetFlight() {

    value = false;
  }

  public MessageSetFlight(boolean value) {

    this.value = value;
  }

  @Override
  public IMessage handleMessage(MessageContext ctx) {

    if (ctx.side != Side.CLIENT)
      return null;

    EntityPlayer player = Minecraft.getMinecraft().thePlayer;
    if (value)
      ChaosBuff.FLIGHT.applyToPlayer(player, 1, null);
    else
      ChaosBuff.FLIGHT.removeFromPlayer(player, 1, null);

    return null;
  }
}

@@ -316,16 +316,67 @@
 r.Side;%0A
+import net.minecraftforge.fml.relauncher.SideOnly;%0A
 import n
@@ -669,16 +669,41 @@
 verride%0A
+  @SideOnly(Side.CLIENT)%0A
   public

Fix server crash with Chaos Gems (closes #95)