K

okay so you made a omni tool for me but now i need a currency system for them i want the pickaxe to earn Minecoins when ores are mines and the sword to earn mob coins when mobs are killed and the fishing rod to earn fish coins when fish are caught and the hoe to earn farm coins i want a config file for them so i can modify how many coins you get from each mob or ore or fish

Kodari AI
KodariJun 9 at 5:38 pm 21
RivalCurrency
A multi-currency system that rewards players with four distinct coin types based on tool usage. Pickaxes earn Minecoins from ore mining, swords earn Mob Coins from mob kills, fishing rods earn Fish Coins from catches, and hoes earn Farm Coins from harvesting crops. All reward amounts are fully configurable per ore, mob, fish type, and crop. Includes player balance commands, pay system, and admin controls for giving, setting, and taking coins.

Hereโ€™s a full breakdown of what was built:


4 Currency Types

Currency
Tool
Trigger
โ› Mine Coins
Any Pickaxe
Breaking an ore
โš” Mob Coins
Any Sword
Killing a mob
๐ŸŽฃ Fish Coins
Fishing Rod
Reeling in a fish
๐ŸŒพ Farm Coins
Any Hoe
Breaking a fully grown crop

Commands

  • /coins โ€” View all 4 balances

  • /coins <mine|mob|fish|farm> โ€” View one balance

  • /coins pay <player> <type> <amount> โ€” Send coins to another player

  • /coinsadmin give|set|take <player> <type> <amount> โ€” Admin controls

  • /coinsadmin reset <player> โ€” Wipe all balances

  • /coinsadmin reload โ€” Hot-reload config

Config notes

  • Every ore, mob, entity type, fish, and crop has its own configurable value in config.yml

  • Set any value to 0 to disable that specific reward

  • Supports decimals (e.g. 1.5)

  • Farm listener only pays out for fully grown crops (wheat at max age, etc.)

  • Data persists to players.yml and saves on server shutdown

K

okay now i need a scoreboard system that displays money, island value, and the amount of coins for whatever omni tool youre holding and could you take away the notification of when you earn mob coins

Kodari AI
KodariJun 9 at 5:56 pm 2

The generation was stopped before any content could be produced.

Kodari AI
KodariJun 9 at 5:59 pm 25

Now let me check the plugin.yml and config to understand the existing setup, and see what APIs are available for money and island value.

Now I have everything I need. Building the scoreboard manager, removing the mob coin notification, and wiring everything up.Good โ€” the first patch already removed the sendMessage line. The file is correct. Now Iโ€™ll create the scoreboard system and update the plugin files.

Now update the main plugin class and plugin.yml:Now create the ScoreboardManager, ScoreboardListener, and add scoreboard config:

Now add the scoreboard config section:

Hereโ€™s a summary of everything done:


Scoreboard โ€” sidebar that auto-updates every second (configurable):

  • ๐Ÿ’ฐ Money โ€” pulls from Vault (shows N/A if Vault isnโ€™t installed)

  • ๐Ÿ Island Value โ€” pulls from SuperiorSkyblock2 (shows N/A if not installed)

  • ๐Ÿ”ง Tool Coins โ€” dynamically shows the coin type for whatever omni tool the player is holding:

    • Pickaxe โ†’ Mine Coins

    • Sword โ†’ Mob Coins

    • Fishing Rod โ†’ Fish Coins

    • Hoe โ†’ Farm Coins

    • Nothing held โ†’ coin line is hidden entirely

Config controls (config.yml โ†’ scoreboard section):

  • enabled โ€” toggle the whole scoreboard

  • title โ€” customize the sidebar title with color codes

  • update-interval โ€” how often it refreshes in ticks

  • show-money / show-island-value / show-tool-coins โ€” toggle individual lines

Mob coin notification โ€” removed โœ…

K

im using IridiumSkyblock

Kodari AI
KodariJun 9 at 6:02 pm 22

Now I have everything I need. Two changes:

  1. Swap SuperiorSkyblock2 โ†’ IridiumSkyblock in ScoreboardManager (reflection-based soft-hook)

  2. Update plugin.yml softdepend

The mob coin notification โ€” CombatListener already sends no message, so thatโ€™s already clean.

Done. Hereโ€™s what changed:

  • IridiumSkyblock hooked โ€” ScoreboardManager now soft-hooks IridiumSkyblockAPI.getInstance() and calls getIslandViaPlayer(player) โ†’ island.getValue() via reflection (safe if the plugin isnโ€™t present)

  • plugin.yml โ€” softdepend swapped from SuperiorSkyblock2 โ†’ IridiumSkyblock

Mob coin notification โ€” CombatListener already sends no message to the player when mob coins are earned, so that was already clean from the original build. If youโ€™re seeing a notification from somewhere else (e.g. the omni tool plugin itself), let me know which plugin itโ€™s coming from and Iโ€™ll track it down.

K

what about the other coins are those notifications off

Kodari AI
KodariJun 9 at 6:03 pm 5

All three are sending notifications. Removing them all now.

All three removed โ€” Mine Coins, Fish Coins, and Farm Coins notifications are now silent, same as Mob Coins.

Kodari can make mistakes. Review important code before using.
Files
src
Code
15 1,205
src/main/java/com/rivalmc/currency/RivalCurrencyPlugin.java
package com.rivalmc.currency;

import com.rivalmc.currency.commands.CoinsAdminCommand;
import com.rivalmc.currency.commands.CoinsCommand;
import com.rivalmc.currency.config.ConfigManager;
import com.rivalmc.currency.data.PlayerDataManager;
import com.rivalmc.currency.listeners.CombatListener;
import com.rivalmc.currency.listeners.FarmingListener;
import com.rivalmc.currency.listeners.FishingListener;
import com.rivalmc.currency.listeners.MiningListener;
import com.rivalmc.currency.listeners.ScoreboardListener;
import com.rivalmc.currency.scoreboard.ScoreboardManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class RivalCurrencyPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private PlayerDataManager playerDataManager;
    private ScoreboardManager scoreboardManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.scoreboardManager = new ScoreboardManager(this);

        getServer().getPluginManager().registerEvents(new MiningListener(this), this);
        getServer().getPluginManager().registerEvents(new CombatListener(this), this);
        getServer().getPluginManager().registerEvents(new FishingListener(this), this);
        getServer().getPluginManager().registerEvents(new FarmingListener(this), this);
        getServer().getPluginManager().registerEvents(new ScoreboardListener(this), this);

        scoreboardManager.start();

        getCommand("coins").setExecutor(new CoinsCommand(this));
        getCommand("coins").setTabCompleter(new CoinsCommand(this));
        getCommand("coinsadmin").setExecutor(new CoinsAdminCommand(this));
        getCommand("coinsadmin").setTabCompleter(new CoinsAdminCommand(this));

        getLogger().info("RivalCurrency enabled successfully.");
    }

    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAll();
        }
        if (scoreboardManager != null) {
            scoreboardManager.stop();
        }
        getLogger().info("RivalCurrency disabled โ€” all data saved.");
    }
}