imDMK / DoubleJump

✨️ Efficient double jump plugin with many features and configuration possibilities.
https://www.spigotmc.org/resources/doublejump-1-17-1-20-1.110632/
GNU General Public License v3.0
12 stars 2 forks source link
bukkit-plugin bukkit-plugins double-jump double-jumping doublejump minecraft-plugin minecraft-plugin-api spigot-plugin spigot-plugins spigotmc-plugin

DoubleJump

Build Status JDK Supported versions SpigotMC Bukkit Paper Modrinth bStats

Information

This is a plugin that allows you to double-jump on the server.

Features

Preview

Command permissions

Command Permission
doublejump command.doublejump
doublejump for command.doublejump.for
doublejump item command.doublejump.item

Placeholder API formats

All placeholders will return null if the player does not have an active double jump (placeholder will not be applied).

Notification types

Particle spawn error

API

To start using API you have to include a double-jump-API jar to your libraries or use:

Maven

  <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>

Gradle

  repositories {
    maven { url 'https://jitpack.io' }
  }

  dependencies {
    implementation 'com.github.imDMK.DoubleJump:doublejump-api:VERSION'
  }

Usage

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!");
        }
    }

Events

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)
            );
        }
    }

Reporting issues

If you have any suggestions or find a bug, please report it using this site.

Support project

If you would like to appreciate this project you can do so here