Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private EffectManager effectManager;
- @EventHandler
- public void onPlayerInteract(final PlayerInteractEvent event) {
- Player player = event.getPlayer();
- if ((player.hasPermission("powerup.use")) &&
- ((event.getAction() == Action.RIGHT_CLICK_AIR) || (event.getAction() == Action.RIGHT_CLICK_BLOCK)) &&
- (player.getItemInHand().getType() == Material.DIAMOND_SWORD))
- if ((player.isSneaking())) {
- Location loc = new Location(event.getPlayer().getWorld()
- , event.getPlayer().getLocation().getX()
- , event.getPlayer().getLocation().getY() + 2
- , event.getPlayer().getLocation().getZ());
- Vector vel = player.getVelocity();
- vel.setY(1);
- player.setVelocity(vel);
- VortexLocationEffect vortexeffect = new VortexLocationEffect(new EffectManager(EffectLib.instance()), loc);
- vortexeffect.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement