Configuring rewards - montlikadani/RageMode GitHub Wiki

How does it work?

Some of the rewards are customizable individually. In order for the player to receive rewards at the end of the game or during the game, these sections will be required for operation:

rewards:
  end-game:
    winner:
      ..
    players:
      ..
  in-game:
    run-commands:
    ..

How do I set the winner to receive a reward?

The winning player can receive money, messages, items or commands that can be run.

In order for winner player to receive a cash reward, use:

rewards:
  end-game:
    winner:
      cash: 5.3

So the player gets 5.3 money. (Cash balances have a double (0.0) format)

If you want the winning player to receive more messages/commands, use:

rewards:
  end-game:
    winner:
      messages:
      - "&aYour messages"
      - "&6Custom!"
      commands:
      - "console: say %player% &aYou won the game! Great job!"
      - "player: me Thanks! ;D"

And if you want the player to get items, use:

rewards:
  end-game:
    winner:
      items:
        customSectionnameHere:
          type: BOW
          amount: 1
          slot: 2
          durability: 0
          meta: true
          name: "&cMy&6 Bow"
          lore:
          - "&4MY bow!!"
          - "&7One shot..."
          enchants:
          - ARROW_INFINITE:1
          - ARROW_DAMAGE:2
        Myitem:
          type: STONE

In this section everything is optional, except the type, because if it is missing, an error is expected.

If other players want to be rewarded, just use:

rewards:
  end-game:
    players:
    ...

This section has the same options as the winning player.

How do I set up in-game commands?

Use this section:

rewards:
  in-game:
    run-commands:
    - "join:console:say %player% &bWelcome&r %player%&6 in this game!"

In this list you can see that it seems a bit complicated, but not. To work properly, follow these options:

Currently command types:

  • join (Joins to the game)
  • death (The player was died)
  • stop (Stopping the game)
  • start (Starting the game)
  • leave (The player left from current played game)

Usage:

<commandType>:<commandSender>:<command>

commandType (See command type)

commandSender (console, player)

command (any command)

What means the in-game section?

In this list you can specify commands that should be execute in game such as joining a player, player death message, and can be in chance value.

Examples:

run-commands:
- chance:50-death:console:msg &cMessage for death!

Will send a message to the player with a 50% chance. Chances must be between 0 and 100!

Command types:

  • death
  • join
  • leave
  • start
  • stop

Usage:

  • [ ] - optional

[chance:<value>]-<commandType>:<commandSender>:<command>

commandType (See command type)

commandSender (console, player)

command (any command)

⚠️ **GitHub.com Fallback** ⚠️