Skip to content

Config examples

Sven Rahn edited this page Jun 13, 2018 · 22 revisions

Just try them out and learn. But please read the wiki pages about the used commands first to understand what's going on. If you need help, contact me at my discord.

If you want to use a " quote in other quotes, you have to 'escape' it using a \ backslash: \" OR You can use triple quotes around a string and then you don't have to escape the inner quotes:

string = "A cool string with \"these\" cool quotes!"
string = """A cool string with "these" cool quotes!"""

Evaluating wealth

aliases {
  "wealth {0}" {
    commands=[
      "*cu execute if \"*cu has money {0} 12\" \"internal_wealth_1 {0}\"",
      "*cu execute if not \"*cu has money {0} 12\" \"*say {0} is broke!\""
    ]
    permission=""
  }
  "internal_wealth_1 {0}" {
    commands=[
      "*say {0} has a little money",
      "*cu execute if \"*cu has money {0} 25\" \"*say and even a bit more!\""
    ]
    permission=admin
  }
}

Simple buy command

aliases {
  "buy basic" {
    commands=[
      """*cu execute if not "*cu has money %player% 300" "*msg %player% You need at least 300$!"""",
      """*cu execute if "*cu has payed %player% 300" "*give %player% minecraft:cookie 50" "*give %player% minecraft:apple 20" "*msg %player You bought the basic pack!" """
    ]
    permission=""
    cooldown="1h"
  }
}

Clone this wiki locally