A plugin based on an ancient Chinese gambling game played with three dice
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.
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
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:
Attention: Change {session_number} to current if you want to get the last session.
Images
/taixiuadmin - taixiu.admin
taixiu.tax.bypass: Bypass taxes.
Click here to see the preivous updates
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);
}