/*
 * Copyright 2015 CrystalCraftMC
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package com.crystalcraftmc.iceball;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public class IceBall extends JavaPlugin {
	//TEAM RED/PURPLE MUST BE TOWARDS THE WEST FROM /SNOWFIGHT LOC PERSPECTIVE
	public final int X = -1;
	public final int Y = 73;
	public final int Z = -384;
	public final int SPAWNX = -66;
	public final int SPAWNY = 32;
	public final int SPAWNZ = 95;
	public final int FIGHTPITCH = 15;
	public final int FIGHTYAW = -90;
	
	public void onEnable() {
		this.getLogger().info("IceBall enabled.");
		new IceBallListener(this);
	}
	public void onDisable() {
		this.getLogger().info("IceBall disabled.");
	}
	public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
		if(sender instanceof Player) {
			if(label.equalsIgnoreCase("snowfight"))
				return true;
			else if(label.equalsIgnoreCase("snowleave"))
				return true;
			
		}
		return false;
	}
}

@@ -656,16 +656,82 @@
 eball;%0A%0A
+import org.bukkit.ChatColor;%0Aimport org.bukkit.World.Environment;%0A
 import o
@@ -992,16 +992,46 @@
 PECTIVE%0A
+%09//ARENA MUST BE IN OVERWORLD%0A
 %09public 
@@ -1571,16 +1571,217 @@
 ayer) %7B%0A
+%09%09%09Player p = (Player)sender;%0A%09%09%09if(p.getLocation().getWorld().getEnvironment() != Environment.NORMAL)%0A%09%09%09%09p.sendMessage(ChatColor.LIGHT_PURPLE + %22You must be in the overworld to use these commands%22);%0A
 %09%09%09if(la
@@ -1897,16 +1897,81 @@
 n true;%0A
+%09%09%09else if(label.equalsIgnoreCase(%22snowbuild%22))%0A%09%09%09%09return true;%0A
 %09%09%09%0A%09%09%7D%0A

Update IceBall.java