Skip to content

Chat Games chatgames

A simple feature that periodically announces minigames in chat where a player must complete a simple task to receive a reward. Tasks may involve typing an answer to a question, placing/breaking a block, enchanting an item, etc.

Config

This config is split into two primary sections: games and settings.


settings Section

Defines things on a broader scale such as how often a game appears or certain messages within a game.

minimum-frequency-seconds maximum-frequency-seconds

The minimum/maximum time to start a new chat game automatically after the previous one ended.

default-expiry-time-seconds

The default time, in seconds, that it takes for an event to time-out.

rewards Sub-Section

This section defines a set of rewards. Use CHANCE:COMMAND on command sections to add a chance of a command running.


games Section

Defines the specific games that are possible of happening. An example of this would be a break-block game for 15 dirt.

This section will use examples to show you how each game type works.

MESSAGE example

    question-example:
      type: MESSAGE
      questions:
        Type {ANSWER} in chat!: $rs(10){abcdefghijklmnopqrstuvwxyz0123456789}
        What year was FKore created?: '2020'
        What year was WineSpigot created?: '2020'
        'Fill in the blank: White ____': wool
        'Reverse the following string: elppa': apple
        Type the alphabet-backwards!:
          - zyxwvutsrqponmlkjihgfedcba
          - z y x w v u t s r q p o n m l k j i h g f e d c b a
      chance-to-happen: 10.0
      expiry-time: 30
      rewards:
        - set-2
        - set-1
This is an example of the MESSAGE type game. These types of games require the user to type some message into chat.

string-must-equal

If set to true, the message the player sends must match the answer exactly.

questions

Defines all the possible questions the game might ask. The left hand side defines the question and the right hand side defines the answer. You may use {ANSWER} in the case where the answer is generated, such as the first example

chance-to-happen

This is a globally defined variable that gives the chance of this specific event happening.

Note

These are relativistic chances. If EVERY game has a 10% chance, then EVERY game is equally likely to happen.

expiry-time

The total duration of the event, in seconds. Will override the default value in settings.

rewards

The rewards the player receives when winning this game, as defined in the settings section.

BREAK_BLOCK example

    break-block-example:
      type: BREAK_BLOCK
      material:
      - STONE
      - DIRT
      goal: 10
      chance-to-happen: 10.0
      rewards:
      - set-2
      - set-1
material

The blocks that the player may break.

Note

This may be a string or a list of strings.

goal

How many block the player must break.

KILL_ENTITY example

    kill-entity-example:
      type: KILL_ENTITY
      entity-type: BLAZE
      goal: 10
      chance-to-happen: 10.0
      rewards:
      - set-2
      - set-1
entity-type

The type of entity that the player must kill.

Note

This may be a string or a list of strings.

FILL_BUCKET example

    fill-bucket-example:
      type: FILL_BUCKET
      bucket-type:
      - LAVA_BUCKET
      - MILK_BUCKET
      - WATER_BUCKET
      chance-to-happen: 10.0
      rewards:
      - set-2
      - set-1
bucket-type

The types of buckets the player may fill.

Note

This may be a string or a list of strings.

ENCHANT_ITEM example

    enchant-item-example:
      type: ENCHANT_ITEM
      item-type: DIAMOND_SWORD # Remove this line to make it work on ANY item.
      chance-to-happen: 10.0
      rewards:
      - set-2
      - set-1
item-type

The type of item that player must enchant. Leave it out for ANY item.

Note

This may be a string or a list of strings.

COMPOUND example

Compound events are events that require more than one 'task' to be completed.

    compound-example:
      type: COMPOUND
      sub-games:
        game-1:
          type: BREAK_BLOCK
          material: STONE
          goal: 10
        game-2:
          type: ENCHANT_ITEM
          item-type:
          - DIAMOND_SWORD
          - IRON_SWORD
          goal: 10
      chance-to-happen: 10.0
      rewards:
      - set-2
      - set-1

sub-games

Defines sub-tasks that must be completed to win the outer event.


Command

  • /chatgames start - Starts a new chat game if one isn't active.
  • /chatgames stop - Stops the current chat game.

Permissions

  • Base Level - Nothing.
  • Admin Level - Admin commands.