TaiXiu - A gambling plugin icon

TaiXiu - A gambling plugin 2.8

A plugin based on an ancient Chinese gambling game played with three dice

CawZvhH.png
"All or nothing"

This plugin was published and got updated on a Vietnamese Minecraft Forum (minecraftvn) before it got translated and now ready to be published on polymart & spigotMC!

 

Description

Tai Xiu (or Sic Bo in English) is a game in the form of betting. In the game, there are three 6-sided dice numbered from 1-6. The dealer (system) will take the sum of the 03 dice that appear to give a final number to the player.

The player's task is to predict whether the result is Tai or Xiu. Xiu is the sum of 3 dice from 3-10, and Tai is 11-18. If the guess is correct, the player will win and receive money.


System requirements

This software runs on Spigot and NMS.
Spigot forks without compiled NMS code are not supported.
Officially supported servers are spigot, paper, and folia.
You must use Java 11 or newer.

Plugin requirements

  1. Vault (Use VaultUnlocked if you're using Folia)
  2. An economy plugin


NOTE: If you are using VaultUnlocked, if recommend to use BetterEconomy as an economy plugin.

Soft-depend plugins
You might need these plugins to utilize all plugin features:

  1. PlaceholderAPI
    1. %taixiu_phien% - Get the current session number
    2. %taixiu_timeleft% - Get current session time left
    3. %taixiu_result_phien_{session_number}% - Get the result of the session {session_number}
    4. %taixiu_resultformat_phien_{session_number}% - Get the format result of the session {session_number} (based on message.yml)
    5. %taixiu_taiplayers_phien_{session_number}% - List the players who bet on Tai
    6. %taixiu_xiuplayers_phien_{session_number}% - List the players who bet on Xiu
    7. %taixiu_taiplayers_bet_phien_{session_number}% - Get the total money of Tai
    8. %taixiu_xiuplayers_bet_phien_{session_number}% - Get the total money of Xiu
    9. %taixiu_totalbet_phien_{session_number}% - Get the total money of the session



Attention: Change {session_number} to current if you want to get the last session.

  1. Floodgate API (GeyserMC)
    1. This will let you be able to use Bedrock forms which I already have set up for this plugin.
  2. Discord Web Hook
    1. Send messages to discord of session's information.
  3. PlayerPoints
    1. Since version 2.3, TaiXiu supports multiple currencies for each playing session. PlayerPoints now can be used as a second currency for players to bet.

 

Main feature
  1. Automatically updating files if there is a new update.
  2. Configable messages, gui, etc..
  3. Supporting API.
  4. Supporting GUI
  5. Supporting Hex Color
  6. Supporting BossBar
  7. Supporting Floodgate (GeyserMC)
  8. Easily managing plugin database


Images
CN7nMEc.png
8DEfAWs.png
i7ukyvE.png
HzfldxG.png
fTVBI2R.png
BICFs9Y.png
AmebA0M.png
gyUs5lv.png
uwr3UKR.png
asi6wCA.png
stkub7b.png
6PH9vau.png
kIebGU4.png

Commands & Permissions
  1. /taixiu - taixiu.use
    1. The main command for the players to use.
      1. toggle
      2. luatchoi
      3. cuoc
      4. thongtin


/taixiuadmin - taixiu.admin

  1. For the administrators to use to adjust stats or reload plugin.
    1. reload
    2. changestate
    3. settime
    4. setcurrency
    5. setresult


taixiu.tax.bypass: Bypass taxes.

Update History

Click here to see the preivous updates

API Usage

Java

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>
    <dependency>
        <groupId>com.github.CortezRomeo</groupId>
        <artifactId>TaiXiu</artifactId>
        <version><VERSION></version>
  </dependency>
        System.out.println(TaiXiuManager.getTime() + " seconds remaining!");
        System.out.println("Current session status: " + TaiXiuManager.getState());
        ISession session = DatabaseManager.taiXiuData.get(4);
        // Session is not valid
        if (session == null) {
            return;
        }

        System.out.println("The result of session" + session.getSession() + " is " + session.getResult());
        System.out.println("Dice number 1: " + session.getDice1());
        System.out.println("Players betted on Xiu: " + (session.getXiuPlayers().isEmpty() ? "" : session.getXiuPlayers()));
    @EventHandler
    public void resultEvent(SessionResultEvent event) {
        ISession sessionData = event.getSessionData();
        HashMap<String, Long> taiPlayers = sessionData.getTaiPlayers();
        HashMap<String, Long> xiuPlayers = sessionData.getXiuPlayers();
        TaiXiuResult result = sessionData.getResult();

        System.out.println("Sic bo session number #" + sessionData.getSession() + " result is " + result);
        System.out.println("There is " + (result == TaiXiuResult.TAI ? taiPlayers.size() : xiuPlayers.size()) + " players betted on " + result);
    }

    @EventHandler
    public void betEvent(PlayerBetEvent event) {
        Player p = event.getPlayer();
        TaiXiuResult bet = event.getBet();
        Long money = event.getMoney();
        System.out.println(p.getName() + " just betted on " + bet.toString() + " with the amount of " + money);
    }

 

Contact
Report a bug or need help with something? You're welcome to my discord server

widget.png?style=banner3