Ban System
Ban plugin for Nukkit, many new features and code improvements. Simple commands like: /tban, /tmute.
Author: | LlamaDevelopmen |
Maintainer | Mundschutziii |
Note: | I’m not a maintainer of the plugin but I can help if you have issues using it with PowerNukkit. |
License | GNU General Public License v3.0 |
Source code | GitHub. BanSystem |
Issue Tracker | Issues ยท llamadevelopment/BanSystem (github.com) |
Compatiblity | 1.4.0.0-PN-ALPHA.2 |
Requirements | If using MySQL, you will need to download DBLib. |
Features
- Timed bans & mutes
- Log data of bans, mutes and warnings
- Change reason and time of running punishments
- Cancel punishments
- Warning system
- MongoDB support
- YAML support
- MySql support
- Everything is editable
- API
Installation
- Download the .jar file.
- Paste the file into your plugin folder.
- If you want to use MySql, you have to install DBLib on your server.
- Start your server.
- And have fun using BanSystem.
Addons
- BanSystem UI-Addon - Manage the BanSystem in a UI
- BanSystem Discord-Addon - Get notifications of BanSystem in your Discord
- BanSystem Duplicate Account Prevention-Addon - Get a player info and see wich duplicated accounts this player owns
Commands & Permissions
Command | Usage | Default Permission |
---|---|---|
ban | /ban <Player> | bansystem.command.ban |
banlog | /banlog <Player> | bansystem.command.banlog |
checkban | /checkban <Player> | bansystem.command.checkban |
checkmute | /checkmute <Player> | bansystem.command.checkmute |
clearbanlog | /clearbanlog <Player> | bansystem.command.clearbanlog |
clearmutelog | /clearmutelog <Player> | bansystem.command.clearmutelog |
clearwarnings | /clearwarnings <Player> | bansystem.command.clearwarnings |
editban | /editban <Player> reason <Reason> /editban <Player> time <hours/days> <Time> | bansystem.command.editban |
editmute | /editmute <Player> reason <Reason> /editmute <Player> time <hours/days> <Time> | bansystem.command.editmute |
kick | /kick <Player> <Reason> | bansystem.command.kick |
mute | /mute <Player> <ID> | bansystem.command.mute |
mutelog | /mutelog <Player> | bansystem.command.mutelog |
tempban | /tempban <Player> <hours/days> <Time> | bansystem.command.tempban |
tempmute | /tempmute <Player> <hours/days> <Time> | bansystem.command.tempmute |
unban | /unban <Player> | bansystem.command.unban |
unmute | /unmute <Player> | bansystem.command.unmute |
warn | /warn <Player> <Reason> | bansystem.command.warn |
warnlog | /warnlog <Player> | bansystem.command.warnlog |
deleteban | /deleteban <ID> | bansystem.command.deleteban |
deletemute | /deletemute <ID> | bansystem.command.deletemute |
deletewarn | /deletewarn <ID> | bansystem.command.deletewarn |
history | /history <Player> | bansystem.command.history |
All commands are editable: Permission, Usage, Command name and Command aliases.
Developer API
Maven
<repository>
<id>lldv-repo</id>
<url>http://system01.lldv.net:8082/artifactory/libs-snapshot</url>
</repository>
<dependency>
<groupId>net.llamadevelopment.bansystem</groupId>
<artifactId>BanSystemNK</artifactId>
<version>2.5.0-20201229.153344-1</version>
</dependency>
API
import net.llamadevelopment.bansystem.BanSystem;
import net.llamadevelopment.bansystem.components.api.BanSystemAPI;
public class Test {
private Provider api = BanSystem.getApi().getProvider();
public void test() {
this.api.getBan("testuser", ban -> {
System.out.println("Player is banned for: " + ban.getReason());
});
this.api.unbanPlayer("testuser", "byME");
}
}
Events
import cn.nukkit.event.EventHandler;
import cn.nukkit.event.Listener;
import net.llamadevelopment.bansystem.components.event.PlayerBanEvent;
import net.llamadevelopment.bansystem.components.event.PlayerUnbanEvent;
public class Test implements Listener {
@EventHandler
public void on(PlayerBanEvent event) {
System.out.println("Player " + event.getBan().getPlayer() + " was banned for " + event.getBan().getReason() + "!");
}
@EventHandler
public void on(PlayerUnbanEvent event) {
System.out.println("Player " + event.getTarget() + " was unbanned by " + event.getExecutor() + "!");
}
}