Skip to content

Commit db6e20d

Browse files
committed
write proper README.md
1 parent 0a35255 commit db6e20d

File tree

2 files changed

+171
-5
lines changed

2 files changed

+171
-5
lines changed

README.md

Lines changed: 158 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,144 @@
1-
# SpicyAzisaBan
1+
# 🚫SpicyAzisaBan
22

33
[![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.azisaba.net%2Frepository%2Fmaven-public%2Fnet%2Fazisaba%2Fspicyazisaban%2Fcommon%2Fmaven-metadata.xml)](https://repo.azisaba.net/#browse/browse:maven-public:net%2Fazisaba%2Fspicyazisaban%2Fcommon)
44

5-
## Publishing to local maven repository
6-
`./gradlew publishToMavenLocal`
5+
## 📖Description
76

8-
## Building (to run the plugin)
9-
`./gradlew shadowJar`
7+
SpicyAzisaBan is an all-in-one punishment system for Velocity. (Heavily inspired by AdvancedBan)
8+
9+
It supports various types of punishments, following are the types of punishments supported by SpicyAzisaBan:
10+
- Ban
11+
- Temp ban
12+
- IP ban
13+
- Temp IP ban
14+
- Mute
15+
- Temp mute
16+
- IP mute
17+
- Temp IP mute
18+
- Warning
19+
- Caution
20+
- Kick
21+
- Note
22+
23+
SpicyAzisaBan also supports multiple servers (such as multiple instances of Velocity), so you can use it in a network environment.
24+
25+
## ✨Features
26+
27+
- Ban, Mute, Warn, Caution, Kick, Note players
28+
- Discord webhook support
29+
- Support multiple instances of Velocity
30+
- Pre-defined reasons for each server/type of punishment
31+
- Customizable messages
32+
- Ban all alt accounts at once
33+
- Lockdown mode (prevent new players from joining the server)
34+
- Punishment automation via external API (see below for more information)
35+
36+
## ❗️Requirements
37+
38+
- Java 17 or later
39+
- Internet connection (for fetching dependencies)
40+
- MySQL or MySQL-compatible (e.g. MariaDB) database
41+
- We recommend using supported versions of MariaDB
42+
43+
## 💻Installation
44+
45+
1. Download the plugin from [Modrinth](https://modrinth.com/plugin/spicyazisaban/versions) and place it in your server's `plugins` folder.
46+
2. Start the server once to generate the configuration file. (Or you can just create the file manually)
47+
3. Configure the plugin in `plugins/SpicyAzisaBan/config.yml`.
48+
4. Restart the server.
49+
5. Do `/sab info` to see if the plugin is working correctly.
50+
51+
## 📝Configuration
52+
53+
```yml
54+
# SpicyAzisaBan config
55+
#
56+
# Important: If you are running from CLI, you only need to configure database settings, and you can just ignore
57+
# anything else.
58+
59+
# Command prefix
60+
# ----------
61+
# You will be able to run command with: /${prefix}command
62+
# So if you set this to "/", you can run command with //command
63+
prefix: ""
64+
65+
# Database settings
66+
# ----------
67+
# MySQL or MySQL-compatible (e.g. MariaDB) database is required to run SpicyAzisaBan.
68+
database:
69+
host: localhost
70+
name: spicyazisaban
71+
user: spicyazisaban
72+
password: p@55w0rd
73+
verifyServerCertificate: false
74+
useSSL: true
75+
# If true, the plugin will prevent players from joining the server if database is inaccessible.
76+
failsafe: true
77+
78+
warning:
79+
# Don't set to 1s, it's too terrible because we fetch the punishments from database every time we check for warnings
80+
sendTitleEvery: 10s
81+
titleStayTime: 5s
82+
83+
# These settings below are reloadable by doing /sab reload
84+
85+
serverNames:
86+
# "server" (key) must not contain UPPERCASE character.
87+
server: FriendlyServerName
88+
defaultReasons:
89+
# valid types: ban, temp_ban, ip_ban, temp_ip_ban, mute, temp_mute, ip_mute, temp_ip_mute, warning, caution, kick, note
90+
# invalid types are ignored
91+
ban:
92+
# <server/group/global>: reasons list
93+
global:
94+
- "ban reason (global) 1"
95+
- "ban reason (global) 2"
96+
lobby:
97+
- "ban reason (lobby) 1"
98+
- "ban reason (lobby) 2"
99+
# a player wouldn't be able to bypass with eg /minecraft:tell
100+
blockedCommandsWhenMuted:
101+
# server: Array<String>
102+
# "global" would affect all servers
103+
global:
104+
- tell
105+
- r
106+
- me
107+
life:
108+
- rpc
109+
- me
110+
banOnWarning:
111+
# if warning count hits 3, 4, 5..., the player would be banned with specified reason
112+
# this feature will be disabled if you set this value to <= 0
113+
threshold: 3
114+
time: "1mo"
115+
# Available variables: %PREFIX%, %COUNT& (current warnings count), %TIME% (above), %ORIGINAL_REASON% (reason used for /warn)
116+
reason: "You've got %COUNT% warnings and you've been banned for %TIME%. (Original reason: %ORIGINAL_REASON%)"
117+
customBannedMessage:
118+
# usually configured via messages.yml, but you can set the message per server here
119+
# key = server
120+
# value = message
121+
rpg:
122+
- "&cA player has been deleted from the server."
123+
124+
# Discord webhook URLs
125+
# If you don't need this feature, simply uncomment the line below.
126+
#webhookURLs: { __fallback__: {} }
127+
# and comment out the lines below.
128+
webhookURLs:
129+
__fallback__:
130+
default: "https://discord.com/api/webhooks/123456/secret"
131+
server1:
132+
default: "https://discord.com/api/webhooks/123456/secret"
133+
global:
134+
default: "https://discord.com/api/webhooks/123456/secret"
135+
ban: "https://discord.com/api/webhooks/789012/secret"
136+
```
10137
11138
## Non-exhaustive list of permissions
139+
140+
We recommend using [LuckPerms](https://luckperms.net) for permission management.
141+
12142
- `sab.command.spicyazisaban`
13143
- `sab.command.spicyazisaban.creategroup`
14144
- `sab.command.spicyazisaban.deletegroup`
@@ -58,3 +188,26 @@
58188
- `sab.notify.caution`
59189
- `sab.notify.kick`
60190
- `sab.notify.note`
191+
- `sab.exempt.mute`
192+
- `sab.exempt.temp_mute`
193+
- `sab.exempt.ip_mute`
194+
- `sab.exempt.temp_ip_mute`
195+
196+
## 🔧Developer API
197+
198+
Unfortunately, SpicyAzisaBan itself does not provide helpful APIs for developers to use. (There are a lot of internal APIs that are not intended to be used by other plugins.)
199+
If you do rely on internal API, you should be aware that it may change without notice.
200+
201+
If you need to automate the punishment system (but not unpunish) from backend Spigot/Paper server, you can use the API provided by [AziPluginMessaging](https://github.com/AzisabaNetwork/AziPluginMessaging).
202+
This is one of our internal plugins, but we provide the API for developers who want to use it.
203+
You need to install the plugin on both the backend (Spigot/Paper) server and the proxy (Velocity) server.
204+
205+
You can see the example of using the API in [PunishCommand.java](https://github.com/AzisabaNetwork/AziPluginMessaging/blob/main/spigot/src/main/java/net/azisaba/azipluginmessaging/spigot/commands/PunishCommand.java).
206+
207+
## 🛟Support
208+
209+
Support is provided via our [Discord server](https://azisaba.dev).
210+
211+
## 📜License
212+
213+
This project is licensed under the GNU General Public License v3.0.

common/src/main/resources/spicyazisaban/config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,16 @@ customBannedMessage:
6767
# value = message
6868
rpg:
6969
- "&cA player has been deleted from the server."
70+
71+
# Discord webhook URLs
72+
# If you don't need this feature, simply uncomment the line below.
73+
#webhookURLs: { __fallback__: {} }
74+
# and comment out the lines below.
75+
webhookURLs:
76+
__fallback__:
77+
default: "https://discord.com/api/webhooks/123456/secret"
78+
server1:
79+
default: "https://discord.com/api/webhooks/123456/secret"
80+
global:
81+
default: "https://discord.com/api/webhooks/123456/secret"
82+
ban: "https://discord.com/api/webhooks/789012/secret"

0 commit comments

Comments
 (0)