For many years, the Spigot API has been a popular API to develop Minecraft server-sided plugins. It has thousands and thousands of unique resources, ranging from mini games to advanced mechanical plugins such as cheat-protection systems. The API is still active today and used by hundreds of developer worldwide and is growing in harmony with Minecraft versions itself.
The API contains a lot of features. You can basically do anything to the server using the API and thus, it’s the main choice for many developers. This is where our problem starts to take shape. Using the API, we can track the events that happen on the server, such as a player that interacts, moves, teleports or an entity that explodes. This is all very handy and people get really crafty with these features yet I found something that has been missing in the API for quite some time.
As you will get familiar with the API, the PlayerMoveEvent seems like the go-to event for handling anything you want to do whenever the player moves. When you want to check if a player is jumping though, you run into a problem. There is at the moment no single API or built-in event that handles player jump movement. This is where JumpAPI comes into play.
JumpAPI uses sampling to track a player’s movement. Whenever a player starts going up, sample points are gathered and saved in a small data-set. These values are than compared to pre-sampled values such as regular jump movement, fast jump movement, or jump movement with a potion multiplier.
It will output a Bukkit event called PlayerJumpEvent whenever the sampled data is matched!
This API is currently only able to detect straight-movement jumps. This means it can only detect jumps when a player is running/walking forward and jumping. Improvements and additions will be made!
(NOTE: This plugin can be resource-intensive!)
Here's an example of how to use it
PlayerJumpEvent
@EventHandler
public void onJump(PlayerJumpEvent event) {
Player player = event.getPlayer();
JumpPattern pattern = event.getJumpPattern();
float score = event.getScore();
Bukkit.broadcastMessage(player.getName() + " has jumped! (Score= " + score + ")");
}Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta