Tags
Creators
Details
6.1.1
Compatibility
Changes
#CoinFlips — 6.1.1
Minor fixes
Head did not change in the animation menu
updateAnimationFramechanged the inventory on the server side but the client never received the update.- Added
player.updateInventory()after each slot modification to force sending to the client.
Negative or zero bets allowed
- A player could enter a negative or zero bet, bypassing the min/max check.
- Added a
bet <= 0check inGuiListener(CREATE_GAME),CoinFlipCommand(create, private). - New message
commands.invalid-betadded inmessages.yml.
Double debit of the loser
finishGame still withdrew the loser's stake even though it was already debited at the join.
- Removed
EconomyUtils.withdraw(loser)infinishGame— only the winner receives the pot.
Formatting amounts according to number-formatting.mode
- All amounts displayed in messages and GUIs used
String. valueOf((long) amount)without any formatting. - Redesigned
MessageUtils.formatNumberwith 3 modes:- Mode 0: comma separator —
1,000,000(pattern configurable viaformatted) - Mode 1: short format —
1k,10k,1M,1B - Mode 2: space separator —
1 000 000
- Mode 0: comma separator —
- Added
ConfigManager. formatAmount(double)which reads the mode and pattern fromconfig.ymland formats the amount. - All
%amount%inGameManager,GuiListener,CoinFlipCommandandGuiManagernow go throughformatAmount.
Automatically add missing keys in config.yml and messages.yml
If a key is present in the default file (bundled in the jar) but absent from the server file, it is added automatically at startup and at /cf reload.
- Existing values are never overwritten.
- Works recursively for all nested sections.
A message is logged in the console when keys are added: Added missing keys to config.yml.
- Implemented in
FileManagerviaaddMissingKeys()andcopyMissing().
#CoinFlips — 6.1.0
Major additions & fixes
Folia Compatibility
- New
utils/SchedulerUtils file. java: automatically detects at startup whether the server is running on Folia (RegionizedServer) or Paper/Spigot. - Exposes unified methods:
runAsync,runAsyncTimer,cancelAsyncTimer,runLater,runLaterForPlayer,runTimer,cancelTimer. - On Paper/Spigot → delegates to the classic
BukkitScheduler.
On Folia → delegates to AsyncScheduler (async tasks) and GlobalRegionScheduler (sync tasks).
GameManager: rotating animation and game cleaning useSchedulerUtils.runTimer/runLater. TypeBukkitTaskreplaced byObjectto be agnostic.DiscordWebhook: sending webhook viaSchedulerUtils.runAsync.
UpdateChecker: update check via SchedulerUtils.runAsync / runAsyncTimer / cancelAsyncTimer.
- The plugin now works on Paper, Spigot and Folia without changing the business logic.
Animation — head rotating to the winner
- The animation displayed a static head. The head now alternates between the creator and the opponent every 4 ticks (~0.2s) for 3 seconds, then freezes on the winner's head for 1 second before displaying the result.
- Added
updateAnimationFrame(Player, String)inGuiManagerto change the header in real time in the open inventory.
openAnimationMenu now accepts creatorName and opponentName as parameters.
Checking balance before creating/joining
- A player without enough money could create or join a game without their balance being verified.
- Added
EconomyUtils.hasBalance()check inGuiListener(CREATE_GAME, JOIN_GAME) andCoinFlipCommand(create, join, private). - The balance is now debited at creation of the game (creator) and at join (opponent).
finishGameonly credits the winner the full amount (stake × multiplier) — no more double debit.
/cf cancel correctly reimburses the creator since the stake is already debited.
- New message
commands.not-enough-moneyadded inmessages.yml.
CoinFlips — 6.0.2
Minor fixes
Animation menu opened when joining a coinflip
- When a player joins a game,
startGameopened the main menu (openMainMenu) instead of the animation menu. - Added the
openAnimationMenu(Player)method inGuiManagerwhich opens theanimationGUI defined inguis.ymlwith the%player%placeholder. GameManager.startGame()now usesopenAnimationMenu+ `GuiType. ANIMATION for both players (creator and opponent) from the start of the game.
CoinFlips — 6.0.1
Minor fixes
GUI does not open when accepting a coinflip
- The
startGamelogic did not open any GUI for players, it just sent messages in the chat after a delay . - The
startGamemethod has been moved toGameManagerand now opens the main menu for both players (creator and joiner) upon starting the game. - Both players' inventories are automatically closed once the result is displayed.
The JOIN_GAME action in GuiListener did not call startGame after joining the game — fixed.
Cleaning parts on disconnection
PlayerListeneronly handled thePlayerJoinEventevent, without any processing on disconnection.- Added a
PlayerQuitEventhandler which:- Removes the player from GUI tracking (
GuiTracker)
- Removes the player from GUI tracking (
- Removes any pending challenges linked to the player
- Cancels the player's game if it is still in
WAITINGstate (games alreadyRUNNINGresolve normally)
- Cancels the player's game if it is still in
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:JkR9vvuk:xUaOlTIA"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:JkR9vvuk:xUaOlTIA"
}

