https://github.com/miniplaceholders/expressions-expansion
A MiniPlaceholders placeholder that allows you to modify placeholders
https://github.com/miniplaceholders/expressions-expansion
miniplaceholders-expansion
Last synced: 10 months ago
JSON representation
A MiniPlaceholders placeholder that allows you to modify placeholders
- Host: GitHub
- URL: https://github.com/miniplaceholders/expressions-expansion
- Owner: MiniPlaceholders
- Created: 2022-08-20T17:50:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-08-22T18:22:51.000Z (10 months ago)
- Last Synced: 2025-08-22T21:01:01.521Z (10 months ago)
- Topics: miniplaceholders-expansion
- Language: Java
- Homepage:
- Size: 463 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Expressions-Expansion
Expressions Expansion for MiniPlaceholders.
## Placeholders
### Basic Operations
- **Addition** | ``
- `` == 10
- **Subtraction** | ``
- `` == 7
- **Multiplication** | ``
- `` == 180
- **Division** | ``
- `` == 2
- **Division remainder** ``
- `` == 1
- **Negation** | ``
- `` == -5
- `` == 5
### Round
- **Round down to integer** | ``
- `` == 5
- `` == 2
- **Round to nearest integer** | ``
- `` == 5
- `` == 3
- **Round up to integer** | ``
- `` == 6
- `` == 3
- **Get the lowest-valued number** | ``
- `` == 2
- **Get the highest-valued number** | ``
- `` == 500
- **A random number from 0 to 1** | `` | Acts like ``
- `` == 0.15
- **A random integer from `min` to `max`** | `` | Acts like ``
- `` == 69
- **A random number from `min` to `max` with a step of `step`** | ``
- `` == 68.75
### String Operations
- **Concat strings** | ``
- `` == "hello_world"
- **Create a substring of `s` from `n1` to `n2` character** | ``
- `` == "ll"
- **Get length of the string** | ``
- `` == 5
- **Format a string using [Java String.format()](https://www.javatpoint.com/java-string-format)** | ``
| *It may be useful for [user expressions](#User-expressions)*
- `` == "4drian3d is not a fruit"
- **Displays `r1` if `o1` and `o2` are same. Otherwise, displays `rs`** | ``
- `` == "NotEquals"
- **Sets `text` placeholders for a player with `uuid`.** | ``
- `>` == 4drian3d
- **Sets `text` placeholders for a player with `name`.** | ``
- `>` == 42
- **Expand to a [User expression](#User-expressions)** | ``
## User expressions
You can create your own expression shortcut in config.yml using our Expression Expansion Language (EEL):
`add_and_multiply: "':'\\':\\'\\'>'>"` means `` will be evaluated to `arg1 + (arg2 * arg3)`. So, `` evaluates to `'>`, which is `2 + (3 * 4) = 14`
### Example user expressions
- `` - Remove `n` first characters from `s` (`hello`, `2` -> `llo`), EEL: ` remove_first: "':'':'\\'>'>"`
- `` - Remove `n` last characters from `s` (`hello`, `2` -> `hel`), EEL: `remove_last: "':0:'\\\\\\'>\\':\\'\\'>'>"`
- `` - format a number (`1.234567`, `2` -> `1.23`), EEL: `decimals: "\\':\\'f\\'>':''>"`
- `` - pad an integer with zeros (`12`, `3` -> `012`), EEL: `pad_integer: "\\':\\'d\\'>':''>"`
## Nesting
Expressions can be nested. Try `/miniplaceholders parse me "\\\\\\\\\\\\\\'>\\\\\\'>\\'>'>"`
## Downloads
[](https://modrinth.com/plugin/expressions-expansion)