Skip to content

Repository files navigation

BetterRNG

BetterRNG is an advanced, flexible Random Number Generator (RNG) system designed for Minecraft Paper servers. It completely overhauls the way server rewards and loot drops are handled. With support for multiple external plugin integrations, dynamic event-based triggers, and an independent Buff system, BetterRNG allows server owners to create deeply customized reward experiences.


🌟 Features

  • Diverse Loot Types: Support for Vanilla items, EXP, Commands, MythicMobs drops, and MMOItems.
  • Dynamic Event Triggers: Passively listen to server events and trigger specific LootSets.
    • Basic Aliases: Easy setup for common events like BLOCK_BREAK, ENTITY_DEATH, MYTHICMOB_DEATH, and PLAYER_JOIN.
    • Advanced Reflection: Define custom triggers for any Bukkit/Paper event or third-party plugin event (e.g., triggering a LootSet when a player catches a fish).
  • Buff System (Multipliers): Boost players' RNG chances using permanent or temporary multipliers. Great for VIP ranks, server-wide boost events, or consumable boosters.
  • In-game GUI: Easily view and inspect available LootSets and rewards directly in-game.
  • High Performance: Built natively for modern Java (Java 25) and PaperMC.

📋 Requirements

  • Java: 25 or higher
  • Server: PaperMC (or forks) API 1.21.x+
  • Dependencies:

🚀 Installation

  1. Download the latest BetterRNG.jar release.
  2. Stop your server.
  3. Place the BetterRNG.jar file into your server's plugins/ folder.
  4. Ensure you have the required dependencies (MythicMobs) installed.
  5. Start the server to generate the default configuration files.
  6. Configure the plugin in plugins/BetterRNG/ to your liking, then use /rng reload in-game or console.

⚙️ Configuration Overview

BetterRNG is highly configurable. When you start the plugin for the first time, it will generate several files and folders:

config.yml

The main configuration file. You can toggle features such as the debug mode. Enable debug: true when you are setting up LootSets and drop rates to monitor calculations in the server console, and set it to false for a clean production environment.

events.yml

This is where the magic happens. You define which server events trigger which LootSets.

  • Basic Example: Using aliases like BLOCK_BREAK for Mining Rewards.
  • Advanced Example: Using Java Reflection to target specific plugin events.
Events:
  mining_stone_reward:
    type: "BLOCK_BREAK"
    conditions:
      material: "STONE"
    lootset: "Miner_Rewards"

lootsets/ Folder

This folder contains your individual LootSets. A LootSet represents a table of possible rewards (items, commands, etc.) with their respective chances.

gui.yml & messages.yml

Customize the look and feel of the in-game LootSet viewer GUI and all plugin messages sent to players.


⚡ Commands & Permissions

The primary command alias is /rng. Permission required for all commands: betterrng.admin

  • /rng reload
    • Description: Reloads all configuration files and LootSets.
  • /rng give <player> <lootset>
    • Description: Forcibly rolls and gives the rewards from a specific LootSet to the targeted player.
  • /rng gui
    • Description: Opens the interactive GUI to view available LootSets (Player only).

Buff System Commands

  • /rng buff check <target>
    • Description: Checks the total, permanent, and temporary RNG multipliers of a player.
  • /rng buff add <target> <multiplier> [duration_seconds]
    • Description: Adds an RNG multiplier to a player. If duration_seconds is omitted, the multiplier is permanent.
  • /rng buff remove <target>
    • Description: Clears all permanent and temporary multipliers from a player, resetting them to 1.0x.

🛠 For Developers

The BetterRNG plugin uses a reflection-based event listener that allows you to hook into virtually any event thrown on the server without requiring a hard API dependency. Check events.yml for instructions on configuring Advanced Mode triggers using exact Class Names, method paths, and expected values.


Author: VoChiDanh

About

BetterRNG is an advanced, flexible Random Number Generator (RNG) system designed for Minecraft Paper servers.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages