Advertisement
lethinh

Untitled

Nov 15th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. public class ClickIncreaser
  2. {
  3.   private boolean hasClickedThisTick = false;
  4.   private final List<Long> clicks = Lists.newArrayList();
  5.  
  6.   @SubscribeEvent
  7.   public void onMouse(MouseEvent event)
  8.   {
  9.     if (event.button != 0) {
  10.       return;
  11.     }
  12.  
  13.     if (event.buttonstate && this.hasClickedThisTick)
  14.     {
  15.       event.setCanceled(true);
  16.       return;
  17.     }
  18.  
  19.     if (event.buttonstate)
  20.     {
  21.       this.hasClickedThisTick = true;
  22.        try
  23.         {
  24.           Robot robot = new Robot();
  25.  
  26.           for(int i=0; i<11; ++i) {
  27.              robot.mousePress(0);
  28.              robot.mouseRelease(0);
  29.           }
  30.         }
  31.         catch (Exception e) {}
  32.     }
  33.   }
  34.  
  35.   @SubscribeEvent
  36.   public void onClientTick(TickEvent.ClientTickEvent event)
  37.   {
  38.     this.hasClickedThisTick = false;
  39.   }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement