2024-03-23 21:06:14 +08:00
|
|
|
---
|
2024-04-05 05:31:22 +08:00
|
|
|
sidebar_position: 3
|
2024-03-23 21:06:14 +08:00
|
|
|
---
|
|
|
|
|
2024-04-13 21:56:49 +08:00
|
|
|
# Math
|
2024-04-04 21:06:23 +08:00
|
|
|
|
2024-04-13 21:56:49 +08:00
|
|
|
:::info
|
|
|
|
|
|
|
|
`eCloud` :https://api.extendedclip.com/expansions/math/
|
|
|
|
|
2024-05-04 00:34:32 +08:00
|
|
|
`Placeholder List` :https://wiki.placeholderapi.com/users/placeholder-list/#math
|
2024-04-13 21:56:49 +08:00
|
|
|
|
|
|
|
`GitHub` :https://github.com/Andre601/Math-Expansion
|
|
|
|
|
|
|
|
:::
|
2024-04-04 21:06:23 +08:00
|
|
|
|
2024-04-04 21:25:31 +08:00
|
|
|
## 安装此扩展
|
|
|
|
```
|
|
|
|
/papi ecloud download Math
|
|
|
|
/papi reload
|
|
|
|
```
|
|
|
|
|
|
|
|
## 如何使用
|
|
|
|
|
|
|
|
### 基础
|
|
|
|
|
|
|
|
```
|
|
|
|
%math_你的算式%
|
|
|
|
```
|
|
|
|
**如:**
|
|
|
|
|
|
|
|
![](_images/Math/1.png)
|
|
|
|
|
2024-05-18 05:19:40 +08:00
|
|
|
发现输出的结果有三位小数,你可以在 `plugins\PlaceholderAPI\config.yml` 中找到
|
2024-04-04 21:25:31 +08:00
|
|
|
|
|
|
|
```
|
|
|
|
math:
|
|
|
|
Disable-Warnings: false
|
|
|
|
Rounding: half-up
|
|
|
|
Decimals: 3
|
|
|
|
Debug: false
|
|
|
|
```
|
|
|
|
|
|
|
|
修改`Decimals: 3`即可修改默认输出的小数位数
|
|
|
|
|
|
|
|
**或者**
|
|
|
|
|
|
|
|
```
|
|
|
|
%math_小数位数_你的算式%
|
|
|
|
```
|
|
|
|
|
|
|
|
**如:**
|
|
|
|
|
|
|
|
![](_images/Math/2.png)
|
|
|
|
|
|
|
|
### 运算符
|
|
|
|
|
|
|
|
- `+` 加法运算
|
|
|
|
- `-` 减法运算
|
|
|
|
- `*` 乘法运算
|
|
|
|
- `%` 除法运算
|
|
|
|
|
|
|
|
支持括号 比如 (1+2)x2=6 为
|
|
|
|
|
|
|
|
![](_images/Math/3.png)
|
|
|
|
|
|
|
|
### 支持变量
|
|
|
|
|
|
|
|
使用 `{}` 代替变量的 `%`
|
|
|
|
|
2024-05-18 05:40:48 +08:00
|
|
|
比如 [Server扩展](https://wiki.placeholderapi.com/users/placeholder-list/#server)的 `%server_online%`显示当前服务器在线玩家数
|
2024-04-04 21:25:31 +08:00
|
|
|
|
|
|
|
![](_images/Math/4.png)
|
|
|
|
|
2024-05-18 05:19:40 +08:00
|
|
|
我本地测试服务器里就我自己一个人,所以 1+1=2
|