blob: 63c4a8fefa3c1d018ddeb8036a14b451883d7382 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package net.justlearning.arslaan3102.arslaansmagichax.modules.impl;
import net.justlearning.arslaan3102.arslaansmagichax.modules.Category;
import net.justlearning.arslaan3102.arslaansmagichax.modules.Module;
import org.lwjgl.glfw.GLFW;
public class Flight extends Module {
public Flight() {
super("Flight", "Enables creative flight in survival.", GLFW.GLFW_KEY_G, Category.MOVEMENT);
}
@Override
protected void onEnable() {
if (mc.player != null) {
mc.player.getAbilities().allowFlying = true;
mc.player.getAbilities().flying = true;
}
}
@Override
protected void onDisable() {
if (mc.player != null) {
mc.player.getAbilities().allowFlying = false;
mc.player.getAbilities().flying = false;
}
}
}
|