zxntg3

generate a /fly plugin that lets anybody fly around for 15 seconds with a 10 second cooldown. When they are done flying they get slowfalling for 30 seconds

Kodari AI
KodariApr 15 at 12:11 am 7,908 (v2)

I’ll create a simple temporary fly plugin with cooldown and slow falling mechanics.

TemporaryFly
A lightweight plugin that provides a /fly command allowing players to fly temporarily for 15 seconds. After flight ends, players receive slow falling for 30 seconds to land safely. Features a 10-second cooldown between uses, configurable durations, and customizable messages. Perfect for adding temporary flight mechanics to survival servers or as a player perk system.

Plan:

  • Main plugin class with manager initialization

  • FlyManager to handle flight states, timings, and cooldowns

  • ConfigManager for configurable durations and messages

  • FlyCommand to execute /fly with validation

Project created! The TemporaryFly plugin provides a /fly command that grants 15 seconds of flight, followed by 30 seconds of slow falling for safe landing, with a 10-second cooldown between uses. All timings and messages are fully configurable.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 253
src/main/java/com/temporaryfly/TemporaryFly.java
package com.temporaryfly;

import com.temporaryfly.commands.FlyCommand;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class TemporaryFly extends JavaPlugin {
    private ConfigManager configManager;
    private FlyManager flyManager;
    
    @Override
    public void onEnable() {
        configManager = new ConfigManager(this);
        flyManager = new FlyManager(this);
        
        getCommand("fly").setExecutor(new FlyCommand(this));
        
        getLogger().info("TemporaryFly has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (flyManager != null) {
            flyManager.cleanup();
        }
        
        getLogger().info("TemporaryFly has been disabled!");
    }
}