-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/com/evaan/frostburn/module/modules/movement/Fly.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.evaan.frostburn.module.modules.movement; | ||
|
||
import com.evaan.frostburn.module.Module; | ||
import net.minecraft.entity.player.PlayerAbilities; | ||
|
||
public class Fly extends Module { | ||
public Fly() {super("Fly", Module.Category.MOVEMENT);} | ||
|
||
@Override | ||
public void onUpdate() { | ||
assert mc.player != null; | ||
|
||
PlayerAbilities abilities = mc.player.getAbilities(); | ||
abilities.flying = true; | ||
|
||
mc.player.sendAbilitiesUpdate(); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
assert mc.player != null; | ||
|
||
PlayerAbilities abilities = mc.player.getAbilities(); | ||
abilities.flying = false; | ||
|
||
mc.player.sendAbilitiesUpdate(); | ||
|
||
} | ||
} |