Advertisement
Guest User

bruh

a guest
Jan 21st, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. PREMOTION:
  2.  
  3. package net.NeonCode.event.impl;
  4.  
  5. import net.NeonCode.event.Cancellable;
  6. import net.NeonCode.event.Event;
  7.  
  8. public class PreMotion extends Event implements Cancellable {
  9.  
  10. private double x;
  11. private double y;
  12. private double z;
  13. private float yaw;
  14. private float pitch;
  15. private boolean onGround;
  16. private boolean cancel;
  17.  
  18. public PreMotion(double x, double y, double z, float yaw, float pitch, boolean onGround) {
  19. this.x = x;
  20. this.y = y;
  21. this.z = z;
  22. this.yaw = yaw;
  23. this.pitch = pitch;
  24. this.onGround = onGround;
  25. this.cancel = false;
  26. }
  27.  
  28. public double getX() {
  29. return x;
  30. }
  31.  
  32. public void setX(double x) {
  33. this.x = x;
  34. }
  35.  
  36. public double getY() {
  37. return y;
  38. }
  39.  
  40. public void setY(double y) {
  41. this.y = y;
  42. }
  43.  
  44. public double getZ() {
  45. return z;
  46. }
  47.  
  48. public void setZ(double z) {
  49. this.z = z;
  50. }
  51.  
  52. public float getYaw() {
  53. return yaw;
  54. }
  55.  
  56. public void setYaw(float yaw) {
  57. this.yaw = yaw;
  58. }
  59.  
  60. public float getPitch() {
  61. return pitch;
  62. }
  63.  
  64. public void setPitch(float pitch) {
  65. this.pitch = pitch;
  66. }
  67.  
  68. public boolean isOnGround() {
  69. return onGround;
  70. }
  71.  
  72. public void setOnGround(boolean onGround) {
  73. this.onGround = onGround;
  74. }
  75.  
  76. public boolean isCancelled() {
  77. return cancel;
  78. }
  79.  
  80. public void setCancelled(boolean cancel) {
  81. this.cancel = cancel;
  82. }
  83. }
  84.  
  85.  
  86. POSTMOTION:
  87.  
  88. package net.NeonCode.event.impl;
  89.  
  90. import net.NeonCode.event.Event;
  91.  
  92. public class PostMotion extends Event {
  93.  
  94. }
  95.  
  96.  
  97.  
  98. PACKETSENT:
  99.  
  100. package net.NeonCode.event.impl;
  101.  
  102. import net.NeonCode.event.Cancellable;
  103. import net.NeonCode.event.Event;
  104. import net.minecraft.network.Packet;
  105.  
  106. public class PacketSent extends Event implements Cancellable {
  107.  
  108. private Packet packet;
  109. private boolean cancel;
  110.  
  111. public PacketSent(Packet packet) {
  112. this.packet = packet;
  113. this.cancel = false;
  114. }
  115.  
  116. public void setPacket(Packet packet) {
  117. this.packet = packet;
  118. }
  119.  
  120. public Packet getPacket() {
  121. return packet;
  122. }
  123.  
  124. @Override
  125. public void setCancelled(boolean cancel) {
  126. this.cancel = cancel;
  127. }
  128.  
  129. @Override
  130. public boolean isCancelled() {
  131. return cancel;
  132. }
  133.  
  134. }
  135.  
  136.  
  137.  
  138. (Interface:) CANCELLABLE:
  139.  
  140. package net.NeonCode.event;
  141.  
  142. public interface Cancellable {
  143.  
  144. public boolean cancel = false;
  145. public abstract void setCancelled(boolean cancel);
  146. public abstract boolean isCancelled();
  147.  
  148. }
  149.  
  150.  
  151.  
  152. WALKING:
  153.  
  154.  
  155. package net.NeonCode.event.impl;
  156.  
  157. import net.NeonCode.event.Event;
  158.  
  159. public class Walking extends Event {
  160.  
  161. private boolean safeWalk;
  162.  
  163. public Walking() {
  164.  
  165. }
  166.  
  167. public void setSafeWalk(boolean safeWalk) {
  168. this.safeWalk = safeWalk;
  169. }
  170.  
  171. public boolean isWalkingSafe() {
  172. return safeWalk;
  173. }
  174.  
  175. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement