Vector plugin.

Discussion in 'Programming' started by BemLo, May 25, 2016.

  1. Hello! I write my plugin for server. Ths is JumpPad. I don't know why my plugin don't work on 1.8.8 server. Main source code for jump:

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent e) {
    if (e.getTo().getBlock().getRelative(BlockFace.DOWN).getType() == Material.STONE_PLATE) {
    e.getPlayer().setVelocity(e.getPlayer().getLocation().getDirection().multiply(3));
    e.getPlayer().setVelocity(new Vector(e.getPlayer().getVelocity().getX(), 1.0D, e.getPlayer().getVelocity().getZ()));
    jumpers.add(e.getPlayer());
    }
    }

    Console haven't errors, but I don't Jump!
     
  2. Did you register it in your onEnable?
     
  3. That doesn't mean you've registered it. :p
     
  4. MiniDigger

    Supporter

    try adding a debug message to your event listener to see if it gets called.
    Why are you setting the velocity twice?