Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ClickIncreaser
- {
- private boolean hasClickedThisTick = false;
- private final List<Long> clicks = Lists.newArrayList();
- @SubscribeEvent
- public void onMouse(MouseEvent event)
- {
- if (event.button != 0) {
- return;
- }
- if (event.buttonstate && this.hasClickedThisTick)
- {
- event.setCanceled(true);
- return;
- }
- if (event.buttonstate)
- {
- this.hasClickedThisTick = true;
- clicks.add(Long.valueOf(System.currentTimeMillis()));
- }
- }
- @SubscribeEvent
- public void onClientTick(TickEvent.ClientTickEvent event)
- {
- this.hasClickedThisTick = false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement