Advertisement
Olivki

SWAG

Mar 30th, 2013
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.90 KB | None | 0 0
  1. package se.proxus.mods.list.combat;
  2.  
  3. import net.minecraft.src.Packet28EntityVelocity;
  4. import se.proxus.Gallium;
  5. import se.proxus.events.EventHandler;
  6. import se.proxus.events.list.server.EventPacketReceived;
  7. import se.proxus.mods.Mod;
  8. import se.proxus.mods.ModCategory;
  9.  
  10. public class AntiVelocity extends Mod {
  11.  
  12.     public AntiVelocity(final Gallium client) {
  13.     super("Anti Velocity", ModCategory.COMBAT, false, client);
  14.     }
  15.  
  16.     @Override
  17.     public void init() {
  18.     setKey("NUMPAD0");
  19.     }
  20.  
  21.     @Override
  22.     public void onEnable() {
  23.     getClient().getEvents().registerListener(this);
  24.     }
  25.  
  26.     @Override
  27.     public void onDisable() {
  28.     getClient().getEvents().unregisterListener(this);
  29.     }
  30.  
  31.     @EventHandler
  32.     public void onEventPacketSent(final EventPacketReceived event) {
  33.     if (!(event.getPacket() instanceof Packet28EntityVelocity))
  34.         return;
  35.     event.setCancelled(true);
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement