StellarCoinFlip

Welcome

StellarCoinFlip is the most advanced and optimized coin betting system for Minecraft servers. Highly customizable, lightweight, and designed for both Java and Bedrock players. Bring excitement to your server with the most comprehensive CoinFlip system on the market.

Configuration

StellarCoinFlip allows highly customizable configuration to adapt to your server’s needs. The main sections of the config.yml file are explained below.

Debug and compatibility options

Controls additional information and compatibility with different versions:

debug: false                        # Show debug information in console
compatibility:
  bedrock-support:
    enabled: false                  # Enable support for Bedrock Edition
    prefix: "."                     # Prefix for Bedrock players (automatically detected)
  paper-chat: false                 # Use Paper's chat system (recommended on Paper/Purpur)

General settings

settings:
  default_currency: "vault"      # Default currency for new bets
  min_bet: 100                   # Minimum allowed bet
  max_bet: 100000                # Maximum allowed bet
  start_bet: 100                 # Initial amount when creating a bet
  # Re-open inventory if player has a coin flip in progress
  re-open-inventory: true
  custom_amount:
    # Available modes: ANVIL (anvil menu), CHAT (type in chat)
    mode: ANVIL

Anti-duplication system

Important configurations to prevent money loss and duplication:

anti-dupe:
  # Defines when a refund occurs if a player disconnects:
  # false → Refund on reconnection (safer, StellarCoinFlip handles the refund)
  # true  → Refund on disconnection
  # Note: possible money loss if economy plugin doesn't save data properly
  refund-on-quit: false
  
  # When the server stops, bets will not be refunded immediately.
  # Instead, refunds will be processed when players reconnect.
  # refund-on-quit must be true for this to work.
  disable-refund-on-stop: true
  
  # If a player disconnects during an ongoing game:
  # false → Result will be announced when player reconnects (good experience)
  # true  → Game will be cancelled immediately (bad experience for online player)
  cancel-rolling-on-quit: false

Announcement configuration

announcements:
  enabled: true                                           # Enable global announcements
  min_to_announce: 1000                                   # Only announce bets of this amount or more
  toggle_permission: stellarcoinflip.toggle.announcements # Permission to personally disable announcements

Currency configuration

You can configure multiple currency types according to the economy plugins you have:

currency:
  # This currency needs Vault and a compatible economy plugin
  vault:
    enabled: true
    name: "Coins"             # Displayed currency name
    symbol: "$"               # Symbol to display
    tax-percent: 0.0          # Tax percentage (0.0 = no tax, 5.0 = 5% tax)
    icon:
      material: "player_head:eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTVmZDY3ZDU2ZmZjNTNmYjM2MGExNzg3OWQ5YjUzMzhkNzMzMmQ4ZjEyOTQ5MWE1ZTE3ZThkNmU4YWVhNmMzYSJ9fX0="
      amount: 1
      custom-model-data: 0    # For custom resource packs
      glowing: false          # Glowing effect on item
  
  # This currency needs the PlayerPoints plugin
  player_points:
    enabled: false
    name: "Player points"
    symbol: "PP"
    tax-percent: 0.0
    icon:
      material: "player_head:texture_base64"
      amount: 1
      custom-model-data: 0
      glowing: false
  
  # This currency needs the CoinsEngine plugin
  coins_engine:
    enabled: false
    name: "CoinsEngine"
    currency: "coins"         # Currency ID in CoinsEngine
    symbol: "CSE"
    tax-percent: 0.0
    
  # This currency needs the TokenManager plugin
  token_manager:
    enabled: false
    name: "TokenManager" 
    symbol: "TKM"
    tax-percent: 0.0
    
  # This currency needs the UltraEconomy plugin
  ultra_economy:
    enabled: false
    name: "UltraEconomy"
    currency: "coins"         # Currency name in UltraEconomy
    symbol: "UE"
    tax-percent: 0.0

Database configuration

Supports H2 (default) and MySQL:

databases:
  # Database type: h2, mysql
  type: "h2"
  h2:
    database: StellarCoinFlip  # Database file name
  mysql:
    host: localhost
    port: 3306
    database: StellarCoinFlip
    user: admin
    password: 123456

# You can customize table names by adding prefixes
databaseTables:
  prefix: "scf_"               # Prefix for all tables
  players: players             # Players table
  coin_flips: coin_flips       # Active bets table
  transactions: transactions   # Transactions table
  actions: actions             # Actions/logs table

Discord Webhooks

Integrate StellarCoinFlip with Discord to receive notifications:

discord-webhook:
  enabled: false                     # Enable Discord webhooks
  # Use this if you have many bets created in a short time to avoid rate limit
  group-messages: false              # Group messages to avoid spam
  min-bet: 1000                      # Only send webhook for bets of this amount or more
  url: https://discord.com/api/webhooks/1000/webhook  # Your webhook URL
  image: https://cdn.discordapp.com/attachments/1000/1000/image.png  # Embed image
  name: StellarCoinFlip              # Bot name on Discord
  create:
    enabled: true                    # Notify when a bet is created
    content: "**{player}** created a coin flip: **{amount} {currency}**"
  finish:
    enabled: true                    # Notify when a bet ends
    content: "**{player}** won a coin flip against **{loser}** with **{amount} {currency}**{tax}"

Commands

CommandDescription
/cf create [amount]Create a coin flip game
/cf play <player>Play against a player’s coin flip
/cf reloadReload the plugin
/cf versionShow plugin version
/cf deleteDelete your coin flip
/cf settings <announcements>Toggle settings

Permissions

PermissionDescription
stellarcoinflip.adminAccess to admin commands like /cf reload
stellarcoinflip.settings.announcementsAccess to settings commands
stellarcoinflip.playAllow using /cf play <player> (you can give this to VIP players)
stellarcoinflip.createAllowed by default
stellarcoinflip.deleteAllowed by default
stellarcoinflip.toggle.announcementsPermission to disable announcements

Placeholders

StellarCoinFlip includes full support for PlaceholderAPI:

General Placeholders

  • %coinflip_wins% – Shows the total number of CoinFlip games you’ve won
  • %coinflip_loses% – Shows the total number of CoinFlip games you’ve lost
  • %coinflip_total_won% – Shows the total amount of money won in CoinFlips
  • %coinflip_net_profit% – Shows your net profit (total won minus total lost)
  • %coinflip_total_lost% – Shows the total amount of money lost in CoinFlips
  • %coinflip_total_total% – Shows the total number of CoinFlips played

Currency-Specific Placeholders

  • %coinflip_specific_<type>_<currency>% – Shows statistics for a specific economy type and currency
  • %coinflip_specific_won_<currency>% – Shows total amount won in a specific currency
  • %coinflip_specific_lost_<currency>% – Shows total amount lost in a specific currency
  • %coinflip_specific_total_<currency>% – Shows total number of CoinFlips played with a specific currency

Supported currencies: vault, coins_engine, player_points, token_manager, ultra_economy

StellarCoinFlip allows complete menu customization. Example of creation menu configuration:

rows: 3                             # Number of inventory rows
title: "Select amount"              # Menu title
items:
  decoration:                       # Decorative item to fill spaces
    material: BLACK_STAINED_GLASS_PANE
    amount: 1
    custom-model-data: 0            # For custom resource packs
    glowing: false
    display-name: "&7"              # Empty name so no text shows
    slots: "0-8;9;17;18-26"         # Slots where it appears (format: individual or ranges)
  
  remove1000:                       # Button to remove 1000 from bet
    material: "player_head:texture_base64"  # Custom head with texture
    amount: 1
    display-name: "&c-1000"
    lore:
      - "&7You can remove 1000 coins to the"
      - "&7amount of coins to flip."
      - "&7"
      - "&eClick to remove 1000!"
    slots: 10                       # Specific slot where it appears
    actions:
      - "action:remove:1000"        # Custom action on click
  
  customAmount:                     # Button for custom amount
    material: ANVIL
    display-name: "&aCustom amount"
    lore:
      - "&7You can set a custom amount"
      - "&7of coins to flip."
      - "&eClick to set custom amount!"
    slots: 18
    actions:
      - "action:custom_amount"      # Opens anvil menu to type amount

Animation System

Animations are configured by frames to create visual effects during bets:

title: "Rolling..."                 # Title shown during animation
rows: 5                             # Animation inventory rows
max-frames: 100                     # Total number of animation frames
frame-tick: 1                       # Ticks between each frame (1 tick = 1/20 second)
frames:
  frame1:                           # First animation frame
    start-frame: 0                  # Frame where it starts
    end-frame: 10                   # Frame where it ends
    items:
      item1:                        # Animation background
        material: BLACK_STAINED_GLASS_PANE
        display-name: "&7"
        slots: "0-44"               # Fill entire inventory
      player:                       # Spinning coin (custom head)
        material: "player_head:texture_base64"
        display-name: "&eRolling..."
        slots: 22                   # Center of inventory
    actions:
      - "sound: BLOCK_NOTE_BLOCK_HAT;1.0;1.0"  # Sound: type;volume;pitch
  
  frame2:                           # Second frame with different color/texture
    start-frame: 10
    end-frame: 20
    items:
      item1:
        material: YELLOW_STAINED_GLASS_PANE        # Change background color
        slots: "0-44"
      player:
        material: "player_head:different_texture"  # Different coin texture
        display-name: "&eRolling..."
        slots: 22
    actions:
      - "sound: BLOCK_NOTE_BLOCK_HAT;1.0;2.0"      # Higher pitch

Note: You can create complex animations by alternating textures, colors, and sounds to realistically simulate a spinning coin.

Action System

StellarCoinFlip includes a powerful action system that can be executed on different events:

ActionDescriptionExample
consoleExecute a command from consoleconsole:say test
commandExecute a command as the playercommand:dm open main
soundPlay a sound to the playersound:ENTITY_ENDERMAN_TELEPORT;1.0f;1.0f
playsound_resource_packPlay a sound from resource packplaysound_resource_pack:ENTITY_ENDERMAN_TELEPORT;1.0f;1.0f
messageSend a chat message to the playermessage:You can't claim this kit.
center_messageSend a centered message to the playercenter_message:You can't claim this kit.
mini_messageSend a message with MiniMessage formatmini_message:<red>You can't claim this kit.</red>
broadcastSend a message to all playersbroadcast:You can't claim this kit.
titlesSend a title and subtitle to the playertitles:<title>Kit Claimed!;<subtitle>Enjoy your rewards!
wait_ticksWait a number of ticks before the next actionwait_ticks:40

Bedrock Forms

StellarCoinFlip includes native support for Bedrock Edition with custom forms:

forms:
  main_flips:
    title: "&6&lCoin Flips <pages>"
    noCoinFlip: "&cNo active coin flips in this moment."
    createCoinFlip: "&a&l+ Create Coin Flip"
    selectCoinFlip: "&7Select a coin flip to bet:"

Sound Configuration

All plugin sounds are completely customizable:

sounds:
  create:
    create_coin_flip:
      sound: ENTITY_PLAYER_LEVELUP
      volume: 1.0
      pitch: 1.0
  game:
    win_coin_flip:
      sound: ENTITY_PLAYER_LEVELUP
      volume: 1.0
      pitch: 1.0
    lose_coin_flip:
      sound: ENTITY_ENDERMAN_TELEPORT
      volume: 1.0
      pitch: 1.0

Customizable Messages

All plugin messages are fully customizable through the lang.yml file:

messages:
  playerNotFound: "&cPlayer not online."
  reloaded: "&aThe plugin has been reloaded."
  youCreated: "&eYou created a coin flip: &f<amount> &6<currency>"
  youDeletedCoinFlip: "&eYou deleted the coin flip refund: &6<amount> <currency>"
  announcements:
    createCoinFlip: "&6&lCoinFlip &8>> &7<player>&e created a coin flip: &f<amount> &6<currency>"
    winCoinFlip: "&6&lCoinFlip &8>> &ePlayer &7<won> has won a bet against &7<lose>&e."

Database

StellarCoinFlip supports multiple database types:

Table Structure

You can customize table names:

databaseTables:
  prefix: "scf_"
  players: players
  coin_flips: coin_flips
  transactions: transactions
  actions: actions

Statistics and Logging

The plugin maintains detailed statistics of:

  • Number of wins and losses per player
  • Total amount won and lost
  • Net profit per player
  • Statistics by currency type
  • Detailed logs of all transactions

Security and Anti-Duplication

StellarCoinFlip includes multiple security measures:

  • Automatic refund if a player disconnects during a bet
  • Duplication detection of coins
  • Economy validation before each transaction
  • Detailed logs of all actions for auditing

Support and Community

StellarCoinFlip is an actively growing project. We appreciate your suggestions, bug reports, and reviews. Join the Discord to contribute and help shape the future of this plugin.

For more information and support, visit our Discord community where you can get help, report issues, and suggest new features.