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.
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).
Done in 3 minutes ! Code: Code:java package monowii.noJump; import org.bukkit.entity.Player;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.player.PlayerJoinEvent;import org.bukkit.plugin.java.JavaPlugin;import org.bukkit.potion.PotionEffect;import org.bukkit.potion.PotionEffectType; public class noJump extends JavaPlugin implements Listener{public void onEnable(){getServer().getPluginManager().registerEvents(this, this); getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable() {public void run() {for (Player p : getServer().getOnlinePlayers()) {p.removePotionEffect(PotionEffectType.JUMP);p.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1200, -127));}} }, 80L, 80L); //Every 2 secondes} @EventHandlerpublic void onJoin(PlayerJoinEvent e){e.getPlayer().removePotionEffect(PotionEffectType.JUMP);e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 1200, -127));} }
Monowii this isn't a plugin development forum like the code by the way EDIT: even though you forgot to put @EventHandler above the join method