forked from cswimr/SeaCogs
docs(pterodactyl): added regex examples page
This commit is contained in:
parent
030291113b
commit
eb5fdfa84e
3 changed files with 68 additions and 31 deletions
|
@ -96,58 +96,29 @@ Default value: `Server started!`
|
|||
|
||||
## `regex`
|
||||
|
||||
If you're not running on recent versions of Paper, which this cog was developed against, or you're otherwise changing for format of chat messages, you'll need to add custom regex through the `[p]pterodactyl config regex` command. Same thing applies if any other type of message isn't being detected. I recomend using ChatGPT or something similar for this, or if you need help, you can join my [Discord server](https://discord.gg/eMUMe77Yb8).
|
||||
If you're not running on recent versions of Paper, which this cog was developed against, or you're otherwise changing for format of chat messages, you'll need to add custom regex through the `[p]pterodactyl config regex` command. Same thing applies if any other type of message isn't being detected. I recomend using ChatGPT or something similar for this, or if you need help, you can join my [Discord server](https://discord.gg/eMUMe77Yb8).
|
||||
See [Regex Examples](regex.md) for default values.
|
||||
|
||||
### `achievement`
|
||||
|
||||
This regex pattern is used to detect advacnements/challenges. The default should work for most Minecraft servers.
|
||||
|
||||
Default value:
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]: (.*) has (made the advancement|completed the challenge) \[(.*)\]$
|
||||
```
|
||||
|
||||
### `chat`
|
||||
|
||||
This regex pattern is used to detect chat messages. You will probably have to change this if you're using any plugins or mods that use custom chat formatting, like EssentialsX Chat or Styled Chat.
|
||||
|
||||
Default value:
|
||||
|
||||
```re
|
||||
\[(\d{2}:\d{2}:\d{2})\sINFO\]:\s<(\w+)>\s(.*)
|
||||
```
|
||||
|
||||
### `join`
|
||||
|
||||
This regex pattern is used to detect whenever a user joins the server. You shouldn't usually need to change this.
|
||||
|
||||
Default value:
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) joined the game$
|
||||
```
|
||||
|
||||
### `leave`
|
||||
|
||||
This regex pattern is used to detect whenever a user leaves the server. You shouldn't usually need to change this.
|
||||
|
||||
Default value:
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) left the game$
|
||||
```
|
||||
|
||||
### `server`
|
||||
|
||||
This regex pattern is used to detect whenever a server message is sent. You will have to change this if you aren't running on Paper, most likely.
|
||||
|
||||
Default value:
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]:(?: \[Not Secure\])? \[(?:Server|Rcon)\] (.*)
|
||||
```
|
||||
|
||||
## `serverid`
|
||||
|
||||
This option determines which server's websocket to connect to. See [Getting Started](getting-started.md#getting-server-information) for more information on this.
|
||||
|
|
65
.docs/pterodactyl/regex.md
Normal file
65
.docs/pterodactyl/regex.md
Normal file
|
@ -0,0 +1,65 @@
|
|||
# Regex Examples
|
||||
|
||||
## 1.20.4 - Paper (Default)
|
||||
|
||||
### Achievements
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]: (.*) has (made the advancement|completed the challenge) \[(.*)\]$
|
||||
```
|
||||
|
||||
### Chat
|
||||
|
||||
```re
|
||||
\[\d{2}:\d{2}:\d{2}\sINFO\]: <(\w+)>\s(.*)
|
||||
```
|
||||
|
||||
### Join
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) joined the game$
|
||||
```
|
||||
|
||||
### Leave
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]: ([^<\n]+) left the game$
|
||||
```
|
||||
|
||||
### Server
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2} INFO\]:(?: \[Not Secure\])? \[(?:Server|Rcon)\] (.*)
|
||||
```
|
||||
|
||||
## 1.20.1 - Forge
|
||||
|
||||
### Achievements
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: (.*) has (made the advancement|completed the challenge) \[(.*)\]$
|
||||
```
|
||||
|
||||
### Chat
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: <(\w+)>\s(.*)
|
||||
```
|
||||
|
||||
### Join
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: ([^<\n]+) joined the game$
|
||||
```
|
||||
|
||||
### Leave
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: ([^<\n]+) left the game$
|
||||
```
|
||||
|
||||
### Server
|
||||
|
||||
```re
|
||||
^\[\d{2}:\d{2}:\d{2}\] \[Server thread\/INFO\] \[minecraft\/MinecraftServer\]: \[(?:Server|Rcon)\] (.*)
|
||||
```
|
|
@ -23,6 +23,7 @@ nav:
|
|||
- pterodactyl/index.md
|
||||
- Getting Started: pterodactyl/getting-started.md
|
||||
- Configuration: pterodactyl/configuration.md
|
||||
- Regex Examples: pterodactyl/regex.md
|
||||
|
||||
plugins:
|
||||
- git-authors
|
||||
|
|
Loading…
Reference in a new issue