/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package net.wurstclient.features.mods;

import net.wurstclient.compatibility.WMinecraft;
import net.wurstclient.events.listeners.UpdateListener;

@Mod.Info(
	description = "Exploits a bug in NoCheat+ that allows you to glitch\n"
		+ "through blocks.",
	name = "Phase",
	tags = "Phaze",
	help = "Mods/Phase")
@Mod.Bypasses(ghostMode = false,
	latestNCP = false,
	antiCheat = false,
	mineplex = false)
public final class PhaseMod extends Mod implements UpdateListener
{
	@Override
	public void onEnable()
	{
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onUpdate()
	{
		WMinecraft.getPlayer().noClip = true;
		WMinecraft.getPlayer().fallDistance = 0;
		WMinecraft.getPlayer().onGround = true;
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
		WMinecraft.getPlayer().noClip = false;
	}
}

@@ -856,21 +856,22 @@
  void on
-Updat
+Disabl
 e()%0A%09%7B%0A%09
@@ -875,87 +875,55 @@
 %7B%0A%09%09
-WMinecraft.getPlayer().noClip = true;%0A%09%09WMinecraft.getPlayer().fallDistance = 0
+wurst.events.remove(UpdateListener.class, this)
 ;%0A%09%09
@@ -949,22 +949,21 @@
 r().
-onGround = tru
+noClip = fals
 e;%0A%09
@@ -984,38 +984,37 @@
 %0A%09public void on
-Disabl
+Updat
 e()%0A%09%7B%0A%09%09wurst.e
@@ -1010,55 +1010,87 @@
 %7B%0A%09%09
-wurst.events.remove(UpdateListener.class, this)
+WMinecraft.getPlayer().noClip = true;%0A%09%09WMinecraft.getPlayer().fallDistance = 0
 ;%0A%09%09
@@ -1108,33 +1108,34 @@
 getPlayer().
-noClip = fals
+onGround = tru
 e;%0A%09%7D%0A%7D%0A

Update PhaseMod