Anti-Jump Plugin

Discussion in 'Archived: Plugin Requests' started by cRysC, Mar 8, 2013.

?

Is this plugin possible?

  1. That eazy!

    100.0%
  2. Could be hard...

    0 vote(s)
    0.0%
  3. That is impossible!!

    0 vote(s)
    0.0%
  1. Offline

    cRysC

    This is what I need :
    I am currently creating a huge RPG Server and one of its main features should be that you can't jump. Don't.even ask me why I don't want people to jump. This has just one reason : It makes things easier for our server.
    I can only explain this in one way : I am making a "Tibia" - Style RPG. I am currently rebuilding lots of cities from it. I need an Anti-Jumping Plugin and I hope someone can do that.

    If this makes things easier for you : You can actually use a Potion Effect to make it impossible to Jump. The Potion Effect is : "Jump Boost with Potency - (Negative) 127"
    If you could make this Potion Effect permanent, that would be great!


    Thanks anyways! cRy.
     
  2. Offline

    Faith

    How are you players supposed to go up blocks or anything?
     
  3. Offline

    cRysC

    m
    Ok I'll explain ya : In Tibia, everythings pretty flat. But no Jumping doesn't mean, that you can't use ladders or stairs. There will be terrain on my Worlds. But the area yoj are moving around in, is pretty flat, but well detailed! Jumping won't.be neccessary (I think I spelled that wrong).
     
  4. Offline

    cRysC

    Bump! Cuz I need AntiJump!
     
  5. Offline

    Adzwoolly

    I'd like to investigate and help but, I'm busy.
    You may hear from me.
     
  6. Offline

    Monowii

    Done in 3 minutes !

    Code:
    Code:java
    1.  
    2. package monowii.noJump;
    3.  
    4. import org.bukkit.entity.Player;
    5. import org.bukkit.event.EventHandler;
    6. import org.bukkit.event.Listener;
    7. import org.bukkit.event.player.PlayerJoinEvent;
    8. import org.bukkit.plugin.java.JavaPlugin;
    9. import org.bukkit.potion.PotionEffect;
    10. import org.bukkit.potion.PotionEffectType;
    11.  
    12. public class noJump extends JavaPlugin implements Listener
    13. {
    14. public void onEnable()
    15. {
    16. getServer().getPluginManager().registerEvents(this, this);
    17.  
    18. getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {
    19. public void run() {
    20. for (Player p : getServer().getOnlinePlayers()) {
    21. p.removePotionEffect(PotionEffectType.JUMP);
    22. p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1200, -127));
    23. }
    24. }
    25.  
    26. }, 80L, 80L); //Every 2 secondes
    27. }
    28.  
    29. @EventHandler
    30. public void onJoin(PlayerJoinEvent e)
    31. {
    32. e.getPlayer().removePotionEffect(PotionEffectType.JUMP);
    33. e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1200, -127));
    34. }
    35.  
    36. }
    37.  
     
  7. Offline

    GodzOfMadness

    Monowii this isn't a plugin development forum :p like the code by the way

    EDIT: even though you forgot to put @EventHandler above the join method
     

Share This Page