➣ ChatGames [1.8-1.21.X] ✅ Best Entertainment For Your Chat ✅+19 GAMES icon

➣ ChatGames [1.8-1.21.X] ✅ Best Entertainment For Your Chat ✅+19 GAMES -----

Get the best chat games in your server using this super versatile chat games plugin!




  • Removed unnecessary imports
----------, Jan 6, 2025

  • Added PAPI support for the special texts in CLICKABLE and HOVERABLE games
----------, Jan 5, 2025

  • Fixed error message when using PAPI placeholders to get spot/points for players that don't exist yet; now just an empty string is returned
  • Dropped support for MythicMobs due to Java version error. Will be reinstated after recode. For more information, read the discord.
----------, Jan 2, 2025

  • Fixed material-related races throwing error due to missing class
  • Minor optimizations
----------, Dec 29, 2024

  • Added support for PlaceholderAPI placeholders for ALL messages
  • Added [player_as_op] as action for commands. Uses custom CommandSender to ensure safety
  • Removed unnecessary methods and imports
  • Improved code readability for database operations

Added comment in rewards.yml for Possible Actions (you don't really need to do this if you're updating from an earlier version):
Code (YAML):
#[player_as_op] - Executes a command as op for the player
----------, Dec 28, 2024

  • Added support for 1.21 materials (localized names still pending in 1.20+)
----------, Dec 27, 2024

  • Removed unnecessary code and imports to improve organization and file size
----------, Dec 26, 2024

  • Small fix in rewards.yml where L should be lowercase
rewards.yml;

Update rewards.yml · nsider4/ChatGames-Premium@23a3845
----------, Dec 24, 2024

CHRISTMAS UPDATE

ADDED NEW GAME:
SHOPPINGLIST - Holiday-themed memorization game
[​IMG]
*clears chat*
[​IMG]
  • Changed the operator for multiplication on MATH game to 'x' from '*'.
Changes to files:

config.yml: Update config.yml · nsider4/ChatGames-Premium@8a5386a
messages.yml: Update messages.yml · nsider4/ChatGames-Premium@493feae
rewards.yml: Update rewards.yml · nsider4/ChatGames-Premium@53c3501
words.yml: Update words.yml · nsider4/ChatGames-Premium@c717e7d
----------, Dec 24, 2024

  • Fixed extra space being added in UNSCRAMBLE game if the word to unscramble is more than 1 word.
----------, Dec 23, 2024

  • Fixed error when trying to start HUNT race with MythicMobs activated but with none added to races
----------, Dec 22, 2024

  • Removed unused imports inside code
----------, Dec 13, 2024

  • Added game log file to track past games
  • Added console log for game starts and endings
  • Added /chatgames logs <amount> to show the past X amount of logs (chatgames.logs)
  • Updated one of the items in chatRaces.yml to have the default value be the supported one in the latest version (1.21)
  • Fixed ChatGamesStartEvent not being called properly
  • Removed unnecessary code and imports

Configs changes:

Update config.yml · nsider4/ChatGames-Premium@8cf6bdc
Update messages.yml · nsider4/ChatGames-Premium@aaf6042
Update chatRaces.yml · nsider4/ChatGames-Premium@68495c9
----------, Nov 30, 2024

  • Fixed error in database when changing table name to something else
----------, Nov 26, 2024

  • Fixed new version message being sent due to version naming on last update (not necessary to update, just did this to avoid the message)
----------, Nov 21, 2024

  • Added support for new blocks and changes for races
  • Fixed error when getting player result and its null
  • Fixed give command parsing item wrong when using CLI
----------, Nov 21, 2024

  • Fixed error message related to winner message generating index out of bounds
----------, Nov 17, 2024

  • Changed player results logic to support if a player leaves after winning but before the game ends
  • Minor code refactoring
----------, Nov 14, 2024

  • Added checking if inventory is full and dropping when giving rewards ONLY if the command is a give command. (new 'inventory_full' setting in messages.yml)
  • Made some error handling for getting player points and fastest time

Addition to messages.yml:
Update messages.yml · nsider4/ChatGames-Premium@1c98286
----------, Nov 9, 2024

  • Added placeholder for when there are several winners but not all spots are filled, now can be modified to anything (messages.yml new setting)
  • Minor code refactoring

messages.yml changes:
Update messages.yml · nsider4/ChatGames-Premium@e20667c
----------, Nov 7, 2024

  • Made string changes to HOVERABLE game started message for default files
  • Minor refactoring of code
----------, Nov 4, 2024

  • Modified code to ensure functionality of winner message
  • Removed unnecessary imports
----------, Nov 3, 2024

  • Modified method that sends winning message to avoid using asynchronous processes. Now ensures no tasks are left before doing other actions.
  • Fixed spacing on CLICKABLE game started message
----------, Nov 1, 2024

  • Added 'table_name' setting to config.yml, will default to 'chatgames' if not present
  • Minor code refactoring

Change: Update config.yml · nsider4/ChatGames-Premium@8bb3846
----------, Oct 31, 2024

Added missing tab completion for:

/chatgames togglesound
/chatgames toggleAll
/chatgames remove
----------, Oct 26, 2024

  • Added MythicMobs soft-depend Support for HUNT race
  • Added example of MythicMobs implementation in chatRaces.yml
  • Fixed HUNT race not counting properly

Changes made to chatRaces.yml:
Update chatRaces.yml · nsider4/ChatGames-Premium@d066dd7
----------, Oct 24, 2024

  • Fixed help command being suggested but not existing
  • Added /chatgames toggleAll to help command text
  • Minor refactoring of general code
----------, Oct 21, 2024

  • Added tab complete for games in lowercase, which only used to show them in uppercase
----------, Oct 9, 2024

  • Fixed fastest top placeholders returning reversed values, instead of 1st it displayed last
  • Fixed answers like "1.17" or questions that contain a dot to not be recognized as answers
  • Fixed /chatgames trivia <question_id> not recognizing ID

More additions coming soon!
----------, Oct 5, 2024

  • Fixed chat races not detecting the correct number to win a game which used to end a game saying you won before you got to the number.
  • Fixed the error message when type of material is not recognized in custom /chatgames <race> <type> <amount>
  • Fixed custom races command not recognizing material IDs in lowercase, now accepts any case.
  • Removed many asynchronous calls to ensure functionality
----------, Oct 4, 2024

  • Fixed cancel-message-when-winning when set to false would still cancel
  • Fixed SQLite database being created and read to from the server's directory causing old database to not be read correctly, now does it from the plugin folder
  • Fixed plugin.yml version being older causing new update message
----------, Sep 30, 2024

  • Fixed MySQL JDBC mentioned twice leading to console error
  • Fixed UNSCRAMBLE, UNREVERSE, and FILLOUT games not showing the affected word, but the answer.
  • Fixed other small bugs
----------, Sep 30, 2024

Big Update

Added Hikari Connection Pool to improve performance on database queries

Added Wiki for the Plugin: https://github.com/nsider4/ChatGames-Premium/wiki

  • Added new game 'GUESS_THE_NUMBER'
  • Added support for custom sounds
  • Added '/chatgames any' command to start a random game/race
  • Added support for new blocks in races in 1.21
  • Added new field for discord webhook
  • Added %chatgames_show_current_pos_top% and %chatgames_show_current_pos_fastest% to show a players current position in the specified leaderboard
  • Added tab completion for points command and new 'any' command that starts random game
  • Fixed task synchronization to not skip games due to race conditon
  • Fixed placeholders that don't work spamming console, now simply return empty string
  • Fixed other small bugs
Added Custom Start Game Command:

/chatgames reaction <word>
/chatgames unscramble <word>
/chatgames unreverse <word>
/chatgames fillout <word>
/chatgames random <length>
/chatgames trivia <question_id>
/chatgames hoverable <word>
/chatgames guess_the_number <number> <range-to-show>
/chatgames math 12 * 4 - 8

There were a few important changes to the configuration files (config, rewards, messages). In an attempt to make it easier to transition into this new update, I've made a GitHub link that shows the things that were added and also removed or changed.

config.yml: https://github.com/nsider4/ChatGames-Premium/commit/03438f0d99bc4b888ac0d9e6834fbf1440c4c04d

rewards.yml: https://github.com/nsider4/ChatGames-Premium/commit/c63ddf16ed7b07bb493adf2bdfc21268889f1ba1

messages.yml: https://github.com/nsider4/ChatGames-Premium/commit/a472a7f26f406793d073b53a1742683905dc1624
----------, Sep 29, 2024

  • Fixed trivia game detecting '.' as correct answer
  • Fixed hex colors not transferring into the next line when centering
  • Fixed clickable and hoverable components not showing up if there wasn't a message before the variable
----------, May 1, 2024

  • Fixed variable message being sent twice
----------, Apr 30, 2024

  • Fixed Hoverable and Clickable games center functionality
  • Fixed centering messages that are long and go into the next line cutting words in half, now the whole word is sent to the following line
----------, Apr 30, 2024

  • Fixed cancel-message-when-winning setting not being detected correctly
  • Fixed long trivia questions being uncentered onto the next line if line was too long. Now it will go onto the next line and be centered
----------, Apr 29, 2024

  • Fixed bug where you could win a new game by pressing the clickable button if the last game was Clickable
----------, Apr 22, 2024

ADDED
  • Tab complete for +points and -points commands
  • Console-supported commands /chatgames toggle <player> and /chatgames togglesound <player>
----------, Apr 17, 2024

ADDED

NEW COMMAND:
/chatgames <race> <type> <amount> - Starts a manual race with the specified arguments. Uses same permission as starting manual games (chatgames.start.<type> or chatgames.start.*)

Example: /chatgames HUNT ZOMBIE 10

New messages.yml value:
Code (YAML):
type_not_found : '&8 [ %prefix%&8] &fUnable to find the type of material/entity for &c%type%'

FIXED
  • Fixed fish game not detecting correct fish
  • Removed unused imports and refactored code for organization
----------, Apr 4, 2024

ADDED

4 NEW COMMANDS

Permission needed ( chatgames.manage.points):
/chatgames +points <player> <amount> - Adds points to a player.'
/chatgames -points <player> <amount> - Removes points from a player.'
/chatgames setpoints <player> <amount> - Sets the points for a player'

Permission needed( chatgames.points):
/chatgames points - Returns your points'


NEW REWARD PARAMETER
- minimum-players parameter is like the chance you assign to each reward

Here's an example on how to use it:
Code (YAML):
unscramble:
  rewards
:
    1
:
      reward_1
:
        minimum-players
: 2 #Online players-based condition, reward can only be chosen if there are 2 or more players online
        chance
: 50
        data
:
         - '10.0 %~ [consolecmd] give %player% diamond_block 3 has:test.permission'
          - ' [consolecmd ] give %player% iron_block 5'
      reward_2
:
        data
:
         - ' [consolecmd ] give %player% iron_block 2'

FIXES
  • Fixed cancel-message-when-winning setting not working
  • Fixed clickable winner message sometimes being sent twice

All new sections added that are needed to run (add this or re-generate):

messages.yml (New fields and modified help command message)
Code (YAML):
number_not_found_commands : '&8 [ %prefix%&8] &cUnable to find number to apply to command'
points_added
: '&8 [ %prefix%&8] &fAdded &a%amount% &fpoints to &c%player%'
points_removed
: '&8 [ %prefix%&8] &fRemoved &a%amount% &fpoints from &c%player%'
points_set
: '&8 [ %prefix%&8] &fSet &c%player%`s &fpoints to &a%amount%'
player_points
: '&8 [ %prefix%&8] &fYou have &a%amount% &fpoints!'
in_cooldown
: '&8 [ %prefix%&8] &cYou can`t use this yet, wait &e%time_left%s &cbefore using the command again'

help_command
:
 - '&7&m -------------------------------------------------'
  - '&e&l-ChatGames-'
  - '&6'
  - '&6&lCOMMANDS:'
  - '&6'
  - '&a/chatgames (type ) &f- &3Starts the event type specified instantly.'
  - '&a/chatgames top &f- &3Shows the top 10 players with most points.'
  - '&a/chatgames fastest &f- &3Shows the top 10 players with fastest times.'
  - '&a/chatgames toggle &f- &3Toggle chat games on or off for yourself'
  - '&a/chatgames togglesound &f- &3Toggle chat games SOUNDS on or off.'
  - '&a/chatgames reload &f- &3Reloads the configuration files.'
  - '&a/chatgames +points <player> <amount> &f- &3Adds points to a player.'
  - '&a/chatgames -points <player> <amount> &f- &3Removes points from a player.'
  - '&a/chatgames setpoints <player> <amount> &f- &3Sets the points for a player'
  - '&a/chatgames points &f- &3Returns your points'
  - '&6'
  - '&2&lGAME TYPES:'
  - '&5unscramble, unreverse, reaction, random, fillout, variable, clickable, math, trivia, hoverable, hunt, mine, place, fish, craft, eat, furnace'
  - '&7&m -------------------------------------------------'
 
----------, Mar 20, 2024

  • Fixed task not starting games sometimes
  • Fixed setting -1 to disable time_minutes sending multiple games
  • Fixed 'enable-races' setting not working
Next update will have new section for discord webhook along with 5 new commands to manage players as an admin (toggles and points management)
----------, Mar 16, 2024

  • Fixed multiple winners messing up the winner message by sending multiple of the same lines
  • Fixed database closed error
  • Fixed asynchronous command execution bug
  • Fixed statement pointer error
----------, Mar 14, 2024

  • Added %winner% and %time% placeholders for the '
    winner-field' section which was not there before. This is where the winner is shown on the discord webhook
  • Fixed FURNACE game and errors
  • Fixed formatting of winner message for multiple players
  • Fixed PlaceholderAPI parse command crashing the server
NEEDED New field in config.yml:
Code (YAML):
discord :
  #If url is empty, this will be ignored as there will be no webhook
  webhook-url
: ''
  message-content
: 'Latest game results:'
  img-url
: 'https://www.spigotmc.org/data/resource_icons/107/107781.jpg?1676494289'
  username
: 'Chat Games'
  title
: 'Chat Games Result'
  description
: 'The winner is:'
  winner-field
: ' %winner% (%time%)' #NEW FIELD
 
----------, Mar 12, 2024

  • Fixed all PlaceholderAPI placeholders issues (including toggle states)
  • Refactored and cleaned up some asynchronous tasks to ensure functionality
----------, Mar 1, 2024

  • Refactored code to fix winner message lines being sent multiple times
  • Removed some unnecessary imports
----------, Feb 28, 2024

  • Fixed CRAFT game not working
  • Refactored code in order to ensure winners are detected correctly
  • Refactored placeholder hook code for toggle
  • Removed some unnecessary code
----------, Feb 27, 2024

  • Removed a logger that was left on last build
  • Removed some unnecessary code
----------, Feb 4, 2024

  • Major optimizations and improved performance by moving all database queries to asynchronous
----------, Feb 2, 2024

No changes to version number as this update is mainly code-related and not functionality changes to gear up for the next update which will add something new related to rewards.

  • Refactored some of the task and games enabled code
----------, Jan 6, 2024

  • Added thread safety checks in order to avoid reported crash
  • Refactored some of the database code

    HOLIDAY SALE IS NOW LIVE
----------, Dec 22, 2023

  • Made it optional for blacklisted words section to be there to avoid issues when starting games (it can be removed from the file if you don't want this function)
----------, Dec 17, 2023

  • Added blacklisted words check to chat games (will check for blacklisted words, and if found will look for a new word while also informing in console that a blacklisted word was found)
  • Minor bug fixes
New field in words.yml right before trivia

Code (YAML):
blacklistedWords :
 - 'ass'
  - 'dumb'
----------, Dec 17, 2023

  • Fixed error of sounds giving error on 1.8, which was due to configs not correcting on start up
  • Refactored utils code to improve version compatibility
  • Removed unnecessary imports
----------, Nov 27, 2023

  • Fixed case-sensitive check happening when answer was correct case.
----------, Nov 24, 2023

  • Fixed races using a different method to add a point whenever they win a game which might've caused conflict as seen from some bugs sent to me.
----------, Nov 17, 2023

  • Added new command (/chatgames remove <name>) to completely remove players from the database. Permission:
    chatgames.remove
  • Refactored some of the top manager code to ensure better functionality and removed unnecessary methods.
Changes in files:
New fields in messages.yml -

player_deleted: '&8[%prefix%&8] &cThe player &f%player% &chas been removed from the database!'
player_not_found: '&8[%prefix%&8] &fUnable to find the player &c%player%'
----------, Nov 17, 2023

-> Added message and sound when the answer is correct but the capitalization is not correct.

upload_2023-11-15_15-23-7.png

  • New fields are: 'wrong-case' to the sound list in config.yml and 'wrong-case' in messages.yml (see default files in resource page for clarification)
  • Tackled MySQL error when players join and leave fast
----------, Nov 15, 2023

  • Changed Discord Webhook feature to run asynchronously as to not block the server processes and optimize the plugin
  • If 'waiting_for_other_winners' is empty nothing will be sent now
----------, Nov 11, 2023

  • Fixed error where it would listen for a chat game when a race is happening
  • Fixed error where timer was messed up due to races and games conflict
----------, Nov 4, 2023

  • Fixed plugin not detecting if game was enabled or disabled
  • Fixed VARIABLE game sending spam of empty messages instead of the game
  • Fixed time counts taking the timer from the last game and adding onto it
  • Fixed cancel-message-when-winning option in config.yml
----------, Oct 28, 2023

  • Enabled clickable game again on default config.yml file
----------, Oct 25, 2023

MAJOR RECODE - NEW GAME, DISCORD WEBHOOKS, OPTIMIZATIONS
This update marks a major RECODE in which a lot of things were modified.

  • MAJOR RE-CODE with a much better organization in its code
  • Major Optimization to overall plugin size and performance (Size from 370kb to 195kb)
  • Added 1 NEW GAME (Furnace/Cooking game) as a race
  • Added Discord Webhooks Support! Let your server's users know who won in Discord!
  • Added option 'cancel-message-when-winning' for those wanting to show the message whenever someone wins too
  • Changed the local placeholders in config.yml and messages.yml to %selection% for most games (not races). Check the default files if you have any doubts
  • Clickable Game bug fixed
It's likely that there will be some small bugs as it's a whole new code although achieving the same result, but join the discord and I'll help you as fast as I can!
----------, Oct 25, 2023

ADDED NEW TYPES TO RANDOM GAME

LOWERCASE_ALPHA (all lowercase letters)

UPPERCASE_ALPHA (all uppercase letters)

HEXADECIMAL (hexadecimal chars: 0123456789ABCDEF)

CUSTOM (Uses whatever is at 'custom_characters')


A new field inside config.yml in the 'random' game section has been added which is 'custom_characters'. It will only be used if the chosen type is "CUSTOM". Should not give any problems if you're not using it and it's not there.

New look:

Code (YAML):
#Types available: ALPHA (letters), ALPHANUMERIC (letters and numbers), NUMERIC (numbers), SYMBOLIC (symbols),
    #LOWERCASE_ALPHA (all lowercase letters), UPPERCASE_ALPHA (all uppercase letters), HEXADECIMAL (hexadecimal chars: 0123456789ABCDEF)
    #CUSTOM (Uses whatever is at 'custom_characters')
    character_type
: ALPHANUMERIC
    #Only if type is "CUSTOM" this line will be used
    custom_characters
: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
----------, Oct 9, 2023

  • Fixed String mistake inside messages.yml and minor change to one of the values
----------, Oct 7, 2023

  • Changed CLICKABLE game to be disabled in config by default as the winner message for this game broke with one of the recent updates
  • Refactored some of the games code for better readability
As I mentioned on Discord, a big re-code of the plugin will be coming likely in the first few days of next month in order to fix issues like the CLICKABLE game and placeholder issue. A new game and maybe a new feature will come with the re-code as well! For more information check out the Discord server announcements.
----------, Sep 23, 2023

  • Refactored some of the expired game code
  • Changed storage of winners for winner message sending system
Known issues to be fixed next update: Clickable Game Winner Message
----------, Sep 17, 2023

  • Fixed jar which was set to the wrong one
----------, Sep 13, 2023

  • Added extra checks for some of the conditions to ensure functionality
----------, Sep 13, 2023

  • Fixed placeholder bug
  • Refactored some top system code which should prevent points to exponentially go up randomly
  • Removed some leftover debug messages from last version
----------, Sep 8, 2023

  • Added support for ItsMyConfig plugin on messages
----------, Sep 8, 2023

  • Time taken to complete ChatGame now rounds to 2 decimals instead of 1
  • Modified task management to make further checks and avoid no-placeholder messages to be sent or game not being selected correctly
  • Refactored some of the top system code to ensure functionality
  • Fixed generation of random characters error
----------, Aug 26, 2023

  • Fixed unscramble game error when trying to generate random choice
  • Fixed ChatGames sounds being played at a location not at a player
  • Fixed time variable that sometimes got too long (3.00000000001), now forced to round to maximum of 2
----------, Aug 20, 2023

  • Removed small console log used for testing that stayed in final version by accident
----------, Aug 19, 2023

  • Added command "/chatgames toggleAll" which toggles all games ON or OFF immediately after executing, so you don't have to be going into config to disable this!
  • Added "chatgames.toggleAll" permission to execute the command that was added.
  • Added new message to messages.yml
messages.yml new line (under 'toggle_sound'):
Code (YAML):
toggleAllGames : '&8 [ %prefix%&8] &fYou have toggled &a%state% &cALL &fchatgames!'
Made considerable refactoring and re-organization of start game methods to avoid games starting with no values in placeholders which had been a commonly reported issue.
----------, Aug 19, 2023

  • Fixed very common bug that servers using ChatManager plugin had conflict with answers.
If you have any other ChatManager-related issues please let me know on Discord.
----------, Jul 25, 2023

  • Fixed error message when player logs in using SQLite
  • Refactored time expired task code
----------, Jul 3, 2023

  • Fixed clickable and hoverable message %prefix% and colors not responding accordingly.
  • Fixed "new update" message in console not showing color.
----------, Jun 18, 2023

  • Added permission 'chatgames.togglesound' to independently handle sounds
  • Modified chat event priority to highest to override ChatManager plugin conflict reported in Discord
  • Fixed MySQL not creating table error
  • Fixed colors in console message when starting a game
----------, Jun 16, 2023

ADDED SUPPORT FOR 1.20
  • Fixed tops showing values of 0 or 0.0
----------, Jun 13, 2023

  • Minor fix from last update that column for fastest top wasn't found.
----------, Jun 12, 2023

Change Log:
  • Fixed fastest top being in wrong order
  • Fixed MINE and PLACE games detecting blocks that were not placed due to world guard restrictions
  • Attempted to fix answer not being processed when a chatgames ends.
----------, Jun 10, 2023

  • ADDED SQLite and MySQL SUPPORT!!
  • Added toggle command for game sounds
  • Other minor fixes
NEW COMMANDS:
  • /chatgames togglesound - Toggles sound on/off
  • /chatgames convert - ONLY OP/Console. If there is an existent pointsdata.yml from previous versions, it will translate all data to the database that was created on the new version! This might be a bit heavy on performance if there's a lot of data.

Changes in files:

These lines were added to config.yml at the top of the file under 'lang':
Code (YAML):
#Storage type, available: SQLite or MySQL
Storage
: 'SQLite'

SQLite
:
    Filename
: 'chatgames-data'

mysql
:
    host
: 'localhost'
    database
: 'chatgame'
    username
: 'root'
    password
: ''
    port
: 3306
    ssl
: false

These lines were added to messages.yml:
Code (YAML):
toggle_sound : '&8 [ %prefix%&8] &fYou have toggled &a%state% &fchat game sounds!'

REMOVED pointsdata.yml (due to moving to SQL storage)

ALL DATA IS NOW HANDLED THROUGH DATABASE, USE CONVERT COMMAND TO MOVE OVER DATA FROM PREVIOUS VERSIONS.
----------, May 18, 2023

  • Added method getTime(Player) to ChatGamesEndEvent. You can now get the time it took a winner to complete the game.
----------, Apr 4, 2023

  • Added 'difficulty' setting for FILLOUT chat game. A percentage from 1-100 can be set. Low number means less letters hidden. Thank you for the suggestion @Noltox
This is how the fillout game looks like in config.yml now:


Code (YAML):
fillout:
    enable
: true
    winners
: 1
   
    #This represents the percentage of hidden letters in the fillout game. Values can range from 1 to 100. Low numbers means less letters hidden.
    difficulty
: 30
    case-sensitive
: true
    #The time users will have to guess, solve, write, etc in seconds.
    timeToGuess_seconds
: 20
    #__Leave the following 2 empty to disable them__
    titleMessage
: '&b %word%'
    subtitleMessage
: '&aFill Out'
----------, Apr 4, 2023

  • Added %points_<position>% variable to show points for the player on winner message (Ex: %points_1%)
  • Added %points% variable to races messages to show points for the winner of the race.
These are only additional features for messages, nothing has to necessarily be changed from your previous configs.
----------, Apr 3, 2023

  • Fixed and modified some comments in yml files.
No big changes so no change to the plugin version.
----------, Apr 2, 2023

  • Changed jar name format to show version (Ex: ChatGames-Premium-1.2.5.jar)
  • Minor string corrections to help command
----------, Mar 31, 2023

  • Attempt at fixing winner message sometimes being sent 2 times.
  • Updated resource page .yml files and Developer API information.
----------, Mar 30, 2023

  • Added 'volume' value to GameSounds in config. Now you can set the volume of the sounds the plugin uses. If the value isn't found it will just set to 0.5
It was added in this format if you have to modify your config.yml:

Code (YAML):
#Sound to send to players when a chat event starts!
GameSounds
:
    volume
: 0.5
    #LEAVE ANY OF THESE EMPTY TO DISABLE THEM
    win
: 'ENTITY_EXPERIENCE_ORB_PICKUP'
    game-start
: 'ENTITY_PLAYER_LEVELUP'
    time-expired
: 'ENTITY_VILLAGER_NO'
----------, Mar 29, 2023

BIG UPDATE!

  • Updated language files download link. THE OLD LINK FOR OLD VERSIONS WILL BE DELETED SOON, SO UPDATE IF YOU WANT TO KEEP USING THIS FUNCTION.\
  • Added %chatgames_toggle% PAPI placeholder, will return true/false if player has games toggled or not.
ADDED DEVELOPER EVENT API

Two events are now in place for developers to use them. The events are ChatGamesStartEvent and ChatGamesEndEvent. More events or API tools may be made later to improve this.

Here are examples for both:

Code (Java):
@EventHandler
    public void onChatGameEnd (ChatGamesEndEvent e ) {
        if (e. getType ( ) == GameType. REACTION ) {
            List <Player > winners = e. getWinners ( ) ;
            for (Player p : winners ) {
                p. sendMessage ( "You won!" ) ;
            }
        }
    }
 
    @EventHandler
    public void onChatGameStart (ChatGamesStartEvent e ) {
        if (e. getType ( ) == GameType. FILLOUT ) {
            Bukkit. broadcastMessage ( "The answer is: " + e. getAnswer ( ) + "!" ) ;
        }
    }
----------, Mar 28, 2023

  • Fixed CRAFT race not working when using SHIFT+CLICK. Now works in any form.
  • Fixed randomDelay task not choosing random numbers every time.
  • Fixed error of selected word is null when time expires on a race when no chat game was done earlier.
  • Fixed VARIABLE game showing 0 seconds left, now shows the correct number set in config.yml.
----------, Mar 27, 2023

  • Fixed fastest top saying 'Your best time is: -1.0 seconds' if you haven't played a game yet. Now should say 0.0
  • Minor string corrections
Bugs regarding random delay in tasks are to be addressed either Saturday or Sunday, as I'm looking for the best solution.
----------, Mar 25, 2023

  • Fixed error spam in console when starting a game soon after starting the server.
----------, Mar 23, 2023

  • Fixed small mistake on coloring
----------, Mar 21, 2023

  • Minor fix to 'separators' string color
----------, Mar 21, 2023

  • Added support for top systems if you want to not send header, footer, or total wins stat message. You can just leave them empty to disable now.
----------, Mar 21, 2023

  • Fixed error message being sent for races if no race had happened prior to the eat event being called
  • Now TRIVIA answers when time runs out just sends the first answer in the list as the correct answer not all joined together.

ADDED MORE OPTIONS FOR TOP SYSTEMS

messages.yml: (MUST UPDATE TO THIS FORMAT TO MAKE IT WORK IF YOU ALREADY HAVE A GENERATED YML)
Code (YAML):
top:
  header
: '&b&m ---------&e&lTOP CHAT&b&m ---------'
  #The separators value is that one message that is sent to space out the top 10 players from header and footer!
  separators
: ''
  format
: '&c %spot%. &f%player% &8| &e&l%points% &7points'
  player-stat-format
: '&7You`ve got &e&l %player_points% &7wins'
  #You can leave the one below empty if you want to disable it! Variable to use is %total_wins%
  total-stat-format
: '&7Total games won globally &e&l %total_wins%'
  footer
: '&b&m ---------------------------'
 
  no_data_message
: '&8 [ %prefix%&8] &cThere is no data yet! Win a chat game and get points!'
 
TypersTop
:
  header
: '&b&m ---------&e&lTOP FASTEST&b&m ---------'
  separators
: ''
  format
: '&c %spot%. &f%player% &8| &e&l%time%&6s'
  player-stat-format
: '&7Your fastest time is &e&l %fastest_time%&6s'
  footer
: '&b&m ------------------------------'
 
  no_data_message
: '&8 [ %prefix%&8] &cThere is no data yet! Win a chat game and be the fastest!'
  top_disabled_message
: '&8 [ %prefix%&8] &cThis function is currently disabled!'
----------, Mar 20, 2023

  • Fixed non-block items not being translated, now working fine. If you have the old json files, please DELETE them and let it REGENERATE a new one!
  • Minor strings corrections
----------, Mar 20, 2023

118 LANGUAGE TYPES SUPPORT ADDED

Note:
Format:
Code (YAML):
#These translations are for plugin sided things such as material and entity names that are used for races. 118 Language Types Supported!
#IT WILL ONLY TRANSLATE THOSE THINGS, CUSTOMIZABLE MESSAGES HAVE TO BE CHANGED MANUALLY.
#
#See the ID for your language here: https://github.com/nsider4/em-translator/blob/main/language_names.txt
#
#CHANGES ARE REGISTERED ONLY ON RESTART
lang
: 'en_us'

- Changes to the 'lang' file only get registered when you restart, RELOAD won't update everything.
----------, Mar 19, 2023

  • Minor code fix that affected 1.8 users
----------, Mar 17, 2023

  • BETTER DEFAULT SET UP FOR THE PLUGIN TO BE READY TO USE OUT-OF-THE-BOX
  • Added customizable message for states ON/OFF of toggle system
  • Optimized the way rewards.yml looks to occupy less lines on races rewards SEE REWARDS.YML IN RESOURCE PAGE
  • Fixed first 7 messages on messages.yml not reloading when using /chatgames reload
NEW RACES REWARD FORMAT
Code (YAML):
races:
    rewards
:
        #THESE ARE THE REWARDS YOU PUT IN 'chatRaces.yml'
        reward_1
:
            chance
: 50
            data
:
             - '60.0 %~ [consolecmd] give %player% diamond_block 5'
        #REMOVING 'chance' VALUE WILL MAKE THE REWARD/COMMAND HAPPEN ALWAYS
        reward_2
:
            data
:
             - ' [consolecmd ] give %player% iron_block 5'
              - ' [playermsg ] &aYou won!'
----------, Mar 17, 2023

  • Added 'count-spawner-mobs' option in HUNT RACE for users who don't want their spawner mobs to affect the challenge.
  • Changed 'creative-enabled' to true in default chatRaces.yml just because it might cause confusion if you're testing it for the first time.
----------, Mar 16, 2023

  • Fixed reward giving error if all chances didn't add up to 100, now just ignores if it falls on the random amount that doesen't have any reward.
  • Fixed some default messages in messages.yml for races
----------, Mar 15, 2023

  • Added support for %prefix% in reward messages ([playermsg] and [broadcast])
----------, Mar 15, 2023

  • Fixed potential no reward being chosen when you don't have a reward that is always given
----------, Mar 15, 2023

HUGE UPDATE:

ADDED 6 DIFFERENT GAMEPLAY-RELATED GAMES!

HUNT - Hunt the monsters as fast as possible
MINE - Mine the blocks as fast as possible
PLACE - Place the blocks as fast as possible
FISH - Fish the fishes as fast as possible
EAT - Eat the food as fast as possible
CRAFT - Craft the item as fast as possible

- They are managed through 'chatRaces.yml', a new YML!

NEW REWARD SYSTEM FOR CHAT GAMES AND RACE GAMES!

  • Added option to have multiple rewards within a winner of a chat game, and multiple choices to choose from in races. All rewards USED have to add up to a maximum of 100% of their 'chance' value.
Format for Chat Games:
Code (YAML):
unscramble:
    rewards
:
        1
:
          reward_1
:
            data
:
             - '10.0 %~ [consolecmd] give %player% diamond_block 3 has:test.permission'
              - ' [consolecmd ] give %player% iron_block 5'
          reward_2
:
            chance
: 50
            data
:
             - ' [consolecmd ] give %player% iron_block 2'

Format for Races:
Code (YAML):
hunt:
    rewards
:
        #THESE ARE THE REWARDS YOU PUT IN 'chatRaces.yml'
        reward_1
:
            chance
: 50
            data
:
             - '10.0 %~ [consolecmd] give %player% diamond_block 3'
        #REMOVING 'chance' VALUE WILL MAKE THE REWARD/COMMAND HAPPEN ALWAYS
        reward_2
:
            data
:
             - ' [consolecmd ] give %player% iron_block 5'
              - ' [playermsg ] &aYou won!'
----------, Mar 14, 2023

NEW REWARD PARAMETER

Code (Text):
has:(permission)
  • You can now check for permissions before giving a reward, this can be used to give different rewards to different ranks or per-world-rewards using a permission plugin. ONLY 1 PERMISSION SUPPORTED ATM. Place at the end of command line.
Example usage:

Code (YAML):
unscramble:
    reward
:
        1
:
          data
:
           - '10.0 %~ [consolecmd] give %player% diamond_block 3 has:test.permission'
            - ' [consolecmd ] give %player% iron_block 5'
----------, Mar 10, 2023

  • Changes to /chatgames help default message sent
  • Other minor string corrections for clearer instructions
----------, Mar 10, 2023

  • Minor string corrections
  • Optimization of reward and game manager code

NEW REWARD SYSTEM:

  • You can now specify different rewards for multiple winners (first, second, etc) through the rewards.yml file
rewards.yml FORMAT EXAMPLE NOW:
Code (YAML):
unscramble:
    reward
:
        1
:
          data
:
           - '10.0 %~ [consolecmd] give %player% diamond_block 3'
            - ' [consolecmd ] give %player% iron_block 5'
Note: See the main resource page 'rewards.yml' spoiler to see the updated look to the format.
YOU HAVE TO UPDATE YOUR REWARDS.YML OR NEW UPDATE WILL NOT WORK WITH AN OLDER VERSION OF THE .YML


NEW RANDOM DELAY BETWEEN GAMES OPTION:

  • Instead of a fixed interval between games, now you have the option to set a minimum and limit for the time that will be randomly generated.
  • You can set time unit of seconds or minutes!
config.yml ADDITION:
Code (YAML):
#If this is enabled, everytime a game ends, it will create a random number from 'randomDelay.minimum' to the number in 'randomDelay.limit' as a delay for the next game
randomDelay
:
    enable
: false
    #Time unit, the other possible value is 'seconds', if you do change it, it's recommended to make the minimum higher than the 'timeToGuess_seconds' for a game
    timeUnit
: 'minutes'
    minimum
: 1
    limit
: 25
Note: See the main resource page 'config.yml' spoiler to see the updated look to the default config.yml.
----------, Mar 8, 2023

  • Fixed variable game generating random number between max and min using deprecated method in later Java versions, now using a way that supports all Java versions.
----------, Mar 7, 2023

  • Minor changes to default strings in messages.yml
  • Added new game as Game Type in the help command
----------, Mar 6, 2023

NEW GAME:

HOVERABLE - Write the word in the hover of a text to win

Image of game:
[​IMG]
----------, Mar 6, 2023

  • Minor code optimizations
  • Added Multiple Answers for Trivia. New format:

Code (YAML):
trivia:
    data
:
        1
:
          question
: 'How many sides does a dice have? (number )'
          answers
:
           - '6'
----------, Mar 5, 2023

  • Added the support for update-checker.
----------, Mar 3, 2023

Resource Information
Author:
----------
Total Downloads: 524
First Release: Mar 3, 2023
Last Update: Jan 6, 2025
Category: ---------------
All-Time Rating:
19 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings