CoinFlipper 2.8

50/50 chance. Winner takes everything. Do you dare?

  1. gronnmann
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Source Code:
    https://github.com/gronnmann/CoinFlipper
    [​IMG]
    Features
    CoinFlipper allows the users to gamble in coin flip games. One player bets an amount of money on which side of the coin will hit, the other challenges him. The winner takes everything. So either you double your bet or lose everything.

    [​IMG]

    Commands & Permissions
    Note: /cf and /coinflip can be used instead of /coinflipper and h and t can be used instead of "heads" and "tails"
    • /coinflipper - Opens the GUI(permission: coinflipper.gui) (/coinflipper gui can also be used)
    • /coinflipper help - Display help (permission: (coinflipper.help)
    • /coinflipper [amount] [heads/tails] - Places a CoinFlipper game (permission: coinflipper.create)
    • /coinflipper clear - Clears all the CoinFlipper games. (permission: coinflipper.clear)
    • /coinflipper stats - View your own stats (coinflipper.stats)
    • /coinflipper animation - Create/edit/delete custom animations (coinflipper.animation)
    • /coinflipper reload - Reload the configuration (coinflipper.reload)
    • /coinflipper config - Open the GUI config editor (coinflipper.config)
    Other permissions are:
    • coinflipper.remove.self - Allows players to remove their own bets with right-clicking them in the GUI.
    • coinflipper.remove.other - Allows players to remove other player's bets with right-clicking them in the GUI.
    • coinflipper.boost.percentage - Sets the players percentage to win to the number specified instead of 'percentage'. For example 'coinflipper.boost.70' would give the player 70% chance to win against a player with none booster.
    • coinflipper.animations.name - Allows you to set animation this player's bets will have. Replace name with the name of the animation you like.
    Showcases
    Usage
    Place bets using command "/coinflipper [amount] [heads/tails].
    Challenge bets by left-clicking in the GUI
    Remove own or other's bets right-clicking in the GUI (depending on permission)

    Boosters
    With the introduction of boosters, administrator will probably wonder how they work. The boosters can difference between three different scenarioes:
    • None of player has booster - Both players get a 50/50 chance at winning the coinflip.
    • Only one player has booster - The player with the booster will get his percentage, while the other gets 100%-the booster players percentage. Example: p1 has 70% booster, p2 has none. In this case, p2 has 30% chance to win.
    • Both players have booster - Each one has a chance of their booster/total sum of both booster. If p1 has 70% booster and p2 has 100% booster, p1 will have 70/170 chance of winning, while p2 will have 100/170 chance of winning.
    Player Animations
    You can change which animation a player's bet gets giving the player permission coinflipper.animations.(name)

    Custom Animations
    As of version 1.5, CoinFlipper supports creation of custom animations.
    The editor is available using the command '/coinflipper animation'
    It's quite self-explainatory, but here's some screenshots:
    Menu:
    [​IMG]

    Use Left Click for accessing the Animation Editor, Right Click to set animation as default. Default Animation will be represented by clay block instead of ball.
    Animation Editor
    [​IMG]

    Each coin toss animation consists of 50 frames. At frame 30 the winning sound is played and message about victory is sent to winning player.

    If you want to import animations from the internet, move the animation files to the animations folder and reload the server.

    Dependency & Plugin support
    This plugin needs Vault to function. It is available here

    Right now CoinFlipper supports the following combat tagging plugins:
    CombatTagPlus
    PvPManager (and its free version) (currently disabled as developer has no maven, available at 2.7 and under)
    CombatLogX (10.x+)
    So don't worry, the rolling GUI won't open in the middle of a PvP fight.

    If you want to input text with a simple Sign GUI instead of chat (MC 1.8-1.9), CoinFlipper supports that given that you download
    ProtocolLib

    Installation
    This plugin has a very easy installation. After adding the dependencies, just Drag & Drop it into the plugins folder, restart the server and it will start working by default. If you wish, you can now change the config file.
    NOTE: You need to restart the server, not reload it. Else the creation of the "messages.yml" file will fail and it will be empty.

    MySQL
    Since version 1.84 CoinFlipper supports saving the stats with MySQL.
    It requires a database and an user that has the right to create and write to a table 'coinflipper_stats'.

    To enable MySQL set the 'mysql_enabled' field in the config to 'true' and fill out the fields in the mysql.yml file as this:

    Code (YAML):
    server: '0.0.0.0:0000' #IP (and alternatively port) to the MySQL server
    database
    : 'coinflipper' #Database for the plugin to use
    user
    : 'user' #User the plugin should log in as
    password
    : 'password' #Password to the user above


    The stats are cached to prevent load on the server.

    If no MySQL is used, the plugin will use SQLite as of version 2.2.

    Configuration
    You can also edit these files using /coinflipper config .
    Code (YAML):

    mysql_enabled
    : false #Set to true to use MySQL instead of SQLite
    min_amount
    : 10 #Minimum money you can bet
    max_amount
    : 1000000 #Maximum money you can bet
    time_expire
    : 60 #Time before bet expires in minutes
    tax_percentage
    : 5 #How high the tax on bets should be
    formatting_shorten_money
    : true #Should numbers be shorted? Example: 1000000 will be displayed as 1M. If set to false, it will be displayed as 1,000,000.
    sound_while_choosing
    : BLOCK_DISPENSER_DISPENSE #What sound should play while flipping
    sound_winner_chosen
    : ENTITY_FIREWORK_BLAST #What sound should play when a player wins
    frame_winner_chosen
    : 30 #At which frame should the winner be chosen. Useful for custom animations.
    boosters_enabled
    : false #Should boosters be enabled
    animations_enabled
    : true #Should animations be enabled?
    animation_default
    : default #Default animation for players
    bets_per_player
    : 1 #Maximum amount bets a player can place
    gui_auto_close
    : true #Should the GUI close automatically after flip
    value_needed_to_broadcast
    : 10 #Value after which wins are broadcasted
    sign_input
    : false #Should the SignInputAPI be enabled (requires ProtocolLib, MC 1.8-1.9)
    disabled_worlds
    : disabledWorld1,disabledWorld2 #At which worlds should the plugin be disabled
    animation_only_challenger
    : false #Should the animation only play for the player who challenges the bet, or to both challenger and the player who placed it?
    max_bets
    : -1 #How many bets should maximally be possible. Use -1 for infinity.
     
    messages.yml is available here

    Metrics
    CoinFlipper uses bStats to collect anonymous data about the server it runs on. If you want to know what data it is, check yourself at
    https://bstats.org/plugin/bukkit/CoinFlipper

    You can disable the metrics by changing the config file in the bStats folder(which is inside the plugins folder).



    The source code of this plugin can be found at:
    https://github.com/gronnmann/CoinFlipper


    If you liked the plugin please leave a review.
    Please don't post errors in the reviews section. They will not be answered to.
    Llisander, Roy7885, HoangMM and 2 others like this.

Recent Updates

  1. Cleaned up code, Maven and fixed issues
  2. Two new CVARs and memory leak fixes
  3. Fixed bug

Recent Reviews

  1. andrewkm
    andrewkm
    4/5,
    Version: 2.7
    Great little plugin, unfortunately there are just a few quirks to work out for 1.16.4 - none the less, amazing idea! <3
  2. Bogdansex
    Bogdansex
    4/5,
    Version: 2.7
    There's a problem on 1.16.3. I cannot use buttons to add money on my own game, when i create one, but custom amount works. When i press the buttons server console spam some wierd erorrs. Hope you can fix it. Plugin is impecable!
    1. gronnmann
      Author's Response
      Hi!
      The issue should be fixed within the next release.
  3. imharrybtw
    imharrybtw
    5/5,
    Version: 2.7
    I really like this plugin. It requires next to no setup to use, and it's really easy to make animations. 5/5!
  4. mrfloris
    mrfloris
    5/5,
    Version: 2.6_1
    Super fun game, works out of the box, any little bug issue i get a swift reply to and dev is friendly. Finally a coinflipper that works on 1.15.2
  5. BoxmanCaleb
    BoxmanCaleb
    5/5,
    Version: 2.6
    Very active developer and will go out of his way to help with any questions / support you have. Thanks again! :)
  6. GuzelFCB
    GuzelFCB
    3/5,
    Version: 2.5
    THe animation if someone plays a CoinFlipp ist not coming. The Menu is empty.... Pls fix it
    1. gronnmann
      Author's Response
      Please post bugs in the Discussions section or in a PM
      Need to know whats wrong so I can fix it
  7. NicholasHogan
    NicholasHogan
    5/5,
    Version: 2.5
    This developer was very speedy in response, the plugin worked as it needed to, absolutely no complaints. When I asked him a question, there was a response within a day, very good plugin with a very good dev.
  8. Stefanus
    Stefanus
    5/5,
    Version: 2.4_3
    Amazing Plugin for betting! Works great on 1.13.2 server.
    Thanks for the easy to use plugin, dev.
  9. rellun
    rellun
    3/5,
    Version: 2.4_3
    look cool but dosent work on 1.44. no matter what i do the gui dosent work . hope u get it to work caus looks nice
  10. hophidat
    hophidat
    5/5,
    Version: 2.4_3
    very gooddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd