addmeonsyntrixthelegend

RxCoinFlip is a Minecraft server plugin (for Spigot/Paper servers) that lets players bet in-game money on coin flip games against each other using a INVENTORY GUI (graphical interface). It integrates with economy plugins via Vault, supports animated flips, stats tracking, and has easy commands for both players and admins.

🧠 Core Concept

Players can create coin flip games with a bet amount.

Other players can join those games and compete.

When two players are matched, the plugin performs a 50/50 animated coin flip.

The winner gets the pot (double the bet), and the loser loses their bet.

Everything is done fairly with random chance.

πŸ“‹ Main Features βœ… Interactive INVENTORY GUI Menus β€” Navigate all games visually βœ… Create & Join Games β€” Pick bet sizes, join open matches βœ… Stats & Leaderboards β€” See wins/losses/history βœ… Animated Coin Flip β€” Coin animation + sound effects βœ… Economy Integration β€” Works with Vault & plugins like EssentialsX βœ… Fair Gameplay β€” True 50/50 random flipping system βœ… Configurable β€” Customize colors, menu items, sounds, and limits in config files

πŸ–ΌοΈ What the INVENTORY GUI Looks Like The INVENTORY GUI is a visual inventory interface inside Minecraft β€” players see a chest-like screen with clickable items. The screens include: 🎯 1. Main Menu This is the first screen players see when they type /coinflip or /cf:

A list of active coin flip games (shown as player heads or icons)

Buttons for navigating pages (next/previous)

Buttons to open other menus (like stats or create game)

A β€œClose” item to exit UI

Example inventory items:

πŸ† Navigation Arrows β€” to change pages

🎲 Active Games β€” player heads showing their wager

πŸ“– Stats Button β€” opens your stats

⭐ Create Game β€” open the bet setup screen

❌ Close Menu β€” exit the INVENTORY GUI

πŸ’° 2. Create Game Menu This menu helps you pick how much you want to bet:

Players click on item icons or type amounts instead of writing them in chat.

You can set the bet amount visually before creating the flip.

πŸ“Š 3. Stats Menu Shows a player’s history:

Games won / lost

Total wagered

Win percentage

Recent results

Leaderboards of top players

πŸͺ™ 4. Animated Flip Screen After both players join:

A smooth coin flip animation plays in the interface.

Sounds and color effects build suspense.

After a few seconds, the result is shown (who won).

🧠 How to Use It In Game ⚑ Commands

/coinflip or /cf β€” Open the main coinflip INVENTORY GUI

/coinflip create <amount> β€” Create a new coinflip

/coinflip stats [player] β€” View stats

/coinflip top β€” View leaderboard

/coinflip reload β€” Reload plugin config (admin)

βš™οΈ Customization & Config Admins can customize many aspects: βœ” Menu titles and sizes βœ” Item icons and text βœ” Bet minimum and maximum limits βœ” Animation speed and sound effects βœ” Colors for different parts of the UI These settings help server owners create a coinflip experience that matches their style and economy.

🎯 Why It’s Used

To add gambling-like mini games to Minecraft servers

To let players challenge each other for in-game money

To provide fun visuals & interaction beyond simple chat commands

Kodari AI
KodariFeb 11 at 10:39 am 22,630 (v2)

I’ll create a comprehensive coin flip gambling plugin with an interactive inventory GUI system.

RxCoinFlip
A feature-rich coin flip gambling plugin with interactive inventory GUIs. Players can create and join coin flip games, betting in-game money for a 50/50 chance to double their wager. Includes animated flip sequences, comprehensive stats tracking, leaderboards, and full economy integration via Vault. All interactions happen through intuitive chest menu interfaces with customizable sounds, items, and betting limits.

##klist: Chec

  • GUI framework (5 core classes)

  • Data classes (Game, Stats)

  • 4 Managers (Game, Stats, Economy, Config)

  • 5 GUI implementations (Main, Create, Stats, Flip, Leaderboard)

  • Commands + Utils

  • Main plugin + configs

All files created successfully! The RxCoinFlip plugin is now complete with:

Core Systems:

  • Full GUI framework with lazy initialization

  • Game management (create/join/flip)

  • Economy integration via Vault

  • Stats tracking with file persistence

  • Leaderboard system

Interactive GUIs:

  • Main menu (paginated active games)

  • Create game (preset bet amounts)

  • Stats viewer (personal statistics)

  • Leaderboard (top players)

  • Animated coin flip (visual + sounds)

Features:

  • 50/50 fair random flips

  • Configurable bet limits

  • Sound effects throughout

  • XSeries cross-version compatibility

  • Lombok for clean code

  • All materials/sounds use XSeries patterns

Players use /cf to open the main menu, click to create games or join existing ones, and watch animated flips with the winner receiving double their bet!

addmeonsyntrixthelegend

Rename the plugin to JobanCoinflip and should work in all versions of paper

Kodari AI
KodariFeb 11 at 10:44 am 30,913 (v2)

I’ll rename the plugin from RxCoinFlip to JobanCoinflip and ensure cross-version compatibility. Let me first read all the files to understand the complete structure.

I’ll rename the plugin from RxCoinFlip to JobanCoinflip and ensure it works on all Paper versions.

Plan:

  • Delete old com.rxcoinflip package files

  • Create new com.jobancoinflip package files with updated names and imports

  • Update plugin.yml, build.gradle, and configs

  • Already uses XSeries for cross-version compatibility

Plugin successfully renamed to JobanCoinflip and configured for all Paper versions (1.13+). The plugin uses XSeries for full cross-version compatibility with materials, sounds, and player skulls. All package names, imports, class names, and references have been updated from com.rxcoinflip to com.jobancoinflip.

addmeonsyntrixthelegend

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 1 error(s):

ERROR in src/main/java/com/jobancoinflip/util/ItemBuilder.java at line 18: variable item might already have been assigned
            this.item = XMaterial.STONE.parseItem();
                ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/jobancoinflip/util/ItemBuilder.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

addmeonsyntrixthelegend

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 1 error(s):

ERROR in src/main/java/com/jobancoinflip/util/ItemBuilder.java at line 18: variable item might already have been assigned
            this.item = XMaterial.STONE.parseItem();
                ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/jobancoinflip/util/ItemBuilder.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

addmeonsyntrixthelegend

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 1 error(s):

ERROR in src/main/java/com/jobancoinflip/util/ItemBuilder.java at line 18: variable item might already have been assigned
            this.item = XMaterial.STONE.parseItem();
                ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/jobancoinflip/util/ItemBuilder.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

addmeonsyntrixthelegend

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 1 error(s):

ERROR in src/main/java/com/jobancoinflip/util/ItemBuilder.java at line 18: variable item might already have been assigned
            this.item = XMaterial.STONE.parseItem();
                ^


=== COMPILATION ERROR ANALYSIS ===

FILES TO INVESTIGATE:
  - src/main/java/com/jobancoinflip/util/ItemBuilder.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariFeb 15 at 3:10 pm 4,776 (v2)

I need to read the ItemBuilder.java file to see the exact issue with the variable assignment.

I can see the issue. The item field is declared as final, but in the constructor at line 15-18, it’s being assigned twice (once at line 16, then potentially again at line 18). A final variable can only be assigned once.

The fix is to use a temporary variable and assign item only once, similar to how the String constructor does it.

Fixed the compilation error by using a temporary variable in the XMaterial constructor to ensure the final item field is only assigned once.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
24 1,621
src/main/java/com/jobancoinflip/JobanCoinflip.java
package com.jobancoinflip;

import com.jobancoinflip.command.CoinFlipCommand;
import com.jobancoinflip.inventory.gui.GUIListener;
import com.jobancoinflip.inventory.gui.GUIManager;
import com.jobancoinflip.manager.ConfigManager;
import com.jobancoinflip.manager.EconomyManager;
import com.jobancoinflip.manager.GameManager;
import com.jobancoinflip.manager.StatsManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class JobanCoinflip extends JavaPlugin {
    private ConfigManager configManager;
    private EconomyManager economyManager;
    private GameManager gameManager;
    private StatsManager statsManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.economyManager = new EconomyManager(this);
        this.gameManager = new GameManager(this);
        this.statsManager = new StatsManager(this);
        this.guiManager = new GUIManager();
        
        if (!economyManager.isEnabled()) {
            getLogger().severe("Economy system not available! Disabling plugin...");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getCommand("coinflip").setExecutor(new CoinFlipCommand(this));
        
        getLogger().info("JobanCoinflip has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (statsManager != null) {
            statsManager.saveAllStats();
        }
        
        getLogger().info("JobanCoinflip has been disabled!");
    }
}