This is a plugin that allows you to double-jump on the server.
Command | Permission |
---|---|
doublejump |
command.doublejump |
doublejump for |
command.doublejump.for |
doublejump item |
command.doublejump.item |
jump-player-delay
- Displays the remaining delay time until the next double jump can be used.jump-player-is-delay
- Returns "yes" or "no" depending on whether the player has a jump delay.jump-player-regeneration-delay
- Shows the remaining time to regenerate one jump in human-readable.jump-player-has-jumps
- Returns "yes" or "no" depending on whether the player has an unused double jump available.jump-player-jumps-limit
- Returns the jump limit value for the player.jump-player-jumps
- Returns the total value of all double jumps performed.jump-player-streak
- Returns the player's current double jump streak.All placeholders will return null if the player does not have an active double jump (placeholder will not be applied).
CHAT
ACTIONBAR
TITLE
SUBTITLE
DISABLED
To start using API you have to include a double-jump-API jar to your libraries or use:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.imDMK.DoubleJump</groupId>
<artifactId>doublejump-api</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.imDMK.DoubleJump:doublejump-api:VERSION'
}
After install dependency, you can access the API using:
DoubleJumpApiProvider.get();
Example usage:
@EventHandler
public void onPlayerChat(AsyncPlayerChatEvent event) {
Player player = event.getPlayer();
String message = event.getMessage();
DoubleJumpApi doubleJumpApi = DoubleJumpApiProvider.get();
JumpPlayerManager jumpPlayerManager = doubleJumpApi.getJumpPlayerManager();
JumpPlayerService jumpPlayerService = doubleJumpApi.getJumpPlayerService();
if (message.equalsIgnoreCase("!testdoublejump")) {
if (this.jumpPlayerManager.isDoubleJumpMode(player)) {
return;
}
event.setCancelled(true);
this.jumpPlayerService.enable(player, true); //true to skip checking if player can use double jump
player.sendMessage("Now u can test our double jump plugin!");
}
}
DoubleJumpEvent
- Called when the player tries to use a double jumpJumpStreakResetEvent
- Called when the player's jump streak will be reset.Example usage:
@EventHandler
public void onPlayerDoubleJump(DoubleJumpEvent event) {
Player player = event.getPlayer();
System.out.println(player.getName() + " used double jump.");
}
@EventHandler
public void onJumpStreakReset(JumpStreakResetEvent event) {
Player player = event.getPlayer();
if (player.isOp()) {
event.setCancelled(true);
return;
}
if (event.getResetReason() == JumpStreakResetReason.PLAYER_ON_GROUND) {
player.teleport(
new Location(player.getWorld(), 100, 100, 100)
);
}
}
If you have any suggestions or find a bug, please report it using this site.
If you would like to appreciate this project you can do so here