Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PREMOTION:
- package net.NeonCode.event.impl;
- import net.NeonCode.event.Cancellable;
- import net.NeonCode.event.Event;
- public class PreMotion extends Event implements Cancellable {
- private double x;
- private double y;
- private double z;
- private float yaw;
- private float pitch;
- private boolean onGround;
- private boolean cancel;
- public PreMotion(double x, double y, double z, float yaw, float pitch, boolean onGround) {
- this.x = x;
- this.y = y;
- this.z = z;
- this.yaw = yaw;
- this.pitch = pitch;
- this.onGround = onGround;
- this.cancel = false;
- }
- public double getX() {
- return x;
- }
- public void setX(double x) {
- this.x = x;
- }
- public double getY() {
- return y;
- }
- public void setY(double y) {
- this.y = y;
- }
- public double getZ() {
- return z;
- }
- public void setZ(double z) {
- this.z = z;
- }
- public float getYaw() {
- return yaw;
- }
- public void setYaw(float yaw) {
- this.yaw = yaw;
- }
- public float getPitch() {
- return pitch;
- }
- public void setPitch(float pitch) {
- this.pitch = pitch;
- }
- public boolean isOnGround() {
- return onGround;
- }
- public void setOnGround(boolean onGround) {
- this.onGround = onGround;
- }
- public boolean isCancelled() {
- return cancel;
- }
- public void setCancelled(boolean cancel) {
- this.cancel = cancel;
- }
- }
- POSTMOTION:
- package net.NeonCode.event.impl;
- import net.NeonCode.event.Event;
- public class PostMotion extends Event {
- }
- PACKETSENT:
- package net.NeonCode.event.impl;
- import net.NeonCode.event.Cancellable;
- import net.NeonCode.event.Event;
- import net.minecraft.network.Packet;
- public class PacketSent extends Event implements Cancellable {
- private Packet packet;
- private boolean cancel;
- public PacketSent(Packet packet) {
- this.packet = packet;
- this.cancel = false;
- }
- public void setPacket(Packet packet) {
- this.packet = packet;
- }
- public Packet getPacket() {
- return packet;
- }
- @Override
- public void setCancelled(boolean cancel) {
- this.cancel = cancel;
- }
- @Override
- public boolean isCancelled() {
- return cancel;
- }
- }
- (Interface:) CANCELLABLE:
- package net.NeonCode.event;
- public interface Cancellable {
- public boolean cancel = false;
- public abstract void setCancelled(boolean cancel);
- public abstract boolean isCancelled();
- }
- WALKING:
- package net.NeonCode.event.impl;
- import net.NeonCode.event.Event;
- public class Walking extends Event {
- private boolean safeWalk;
- public Walking() {
- }
- public void setSafeWalk(boolean safeWalk) {
- this.safeWalk = safeWalk;
- }
- public boolean isWalkingSafe() {
- return safeWalk;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement