thebestdude12345

make passive only work with the weapon not hand or any other weapon like sword force crit only works with sword and axe and bow and crossbow and mace and remove the yellow words down and make when player dies drops strength and make a cooldown for passive ability and fix sword ability the sword in offhand can be duped and make dmg of bow beam higher and add dash ability to mace and make ability keybinds like shift right click or shift f or q customizable

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
44 2,722
src/main/java/com/strengthsmp/StrengthSMP.java
package com.strengthsmp;

import com.strengthsmp.commands.*;
import com.strengthsmp.listener.*;
import com.strengthsmp.manager.*;
import com.strengthsmp.placeholder.StrengthPlaceholder;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class StrengthSMP extends JavaPlugin {

    private static StrengthSMP instance;

    private StrengthManager strengthManager;
    private WeaponManager weaponManager;
    private ComboManager comboManager;
    private UltimateManager ultimateManager;
    private DeathBanManager deathBanManager;
    private DataManager dataManager;
    private TrustManager trustManager;
    private ActionBarManager actionBarManager;
    private RecipeManager recipeManager;
    private GUIManager guiManager;

    public static StrengthSMP getInstance() {
        return instance;
    }

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();

        dataManager = new DataManager(this);
        strengthManager = new StrengthManager(this);
        weaponManager = new WeaponManager(this);
        comboManager = new ComboManager(this);
        ultimateManager = new UltimateManager(this);
        deathBanManager = new DeathBanManager(this);
        trustManager = new TrustManager(this);
        actionBarManager = new ActionBarManager(this);
        recipeManager = new RecipeManager(this);
        guiManager = new GUIManager();

        registerListeners();
        registerCommands();
        registerRecipes();

        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new StrengthPlaceholder(this).register();
        }

        getLogger().info("StrengthSMP Season 4 enabled.");
    }

    @Override
    public void onDisable() {
        if (dataManager != null) {
            dataManager.saveAll();
        }
        getLogger().info("StrengthSMP disabled.");
    }

    private void registerListeners() {
        var pm = Bukkit.getPluginManager();
        pm.registerEvents(new CombatListener(this), this);
        pm.registerEvents(new ProjectileListener(this), this);
        pm.registerEvents(new PlayerJoinListener(this), this);
        pm.registerEvents(new PlayerDeathListener(this), this);
        pm.registerEvents(new ItemInteractListener(this), this);
        pm.registerEvents(new PotionListener(this), this);
        pm.registerEvents(new ShieldListener(this), this);
        pm.registerEvents(new MaceListener(this), this);
        pm.registerEvents(new GUIListener(guiManager, this), this);
        pm.registerEvents(new DualWieldProtection(this), this);
    }

    private void registerCommands() {
        getCommand("strength").setExecutor(new StrengthCommand(this));
        getCommand("ability").setExecutor(new AbilityCommand(this));
        getCommand("withdraw").setExecutor(new WithdrawCommand(this));
        getCommand("trust").setExecutor(new TrustCommand(this));
        getCommand("cooldown").setExecutor(new CooldownCommand(this));
        getCommand("charge").setExecutor(new ChargeCommand(this));
        getCommand("strengthsmp").setExecutor(new StrengthSMPCommand(this));
    }

    private void registerRecipes() {
        recipeManager.registerAll();
    }
}