MyBan
MyBan
MyBan only contains a few functions, but its completly open source! It contains:
- Ban a player
- Unban a player
- messages.yml
- config.yml
- database.yml
- API
- Source-Code
You need a MySQL database to use this plugin!
Commands / Permissions
- /ban <Player> [Reason] = myban.ban
- /unban <Player> = myban.unban
- myban.announce = Players with this permission get a notify on ban / unban.
Ban or unban a player.
Installation
- Download the plugin
- Drag and drop in your plugins folder
- Start/restart/reload your server
- Configurate all YML-files
- Restart the server
Config.yml / Database.yml / Messages.yml
Config.yml
- add_to_banned-players_file = Add the banned player to this file means he is already banned also if the database is down
- allow_op-ban = Set this to true means a player with op can be banned
- announce_permission_player = Set this to true and all players with permission get an announcement on ban / unban
Database.yml
This should be clearly.
Messages.yml
This should be clearly, too. You can use varibles like %player% %by% and %reason%. Write them in lower case.
API
This plugin also have an easy to use API. Just add it to your build path. Ban a player:
MyBan.banPlayer(commandsender, "Testplayer", "Dont swear!");
Commandsender can be a player or the console.
Unban a player:
MyBan.unbanPlayer(commandsender, "Testplayer");
Commandsender can be a player or the console.
Check if player is banned;
if(MyBan.isBanned("Testplayer")) { //Testplayer is banned } else { //Testplayer is not banned }
Get banreason of player:
MyBan.getReason("Testplayer"); //For example: Could return "&cDont swear!";
Source
The source code is included in the JAR-File.
- Open the MyBan.jar with WinRAR or what ever
- Extract the src folder
- Enjoy customizing
Du sprichst kein Englisch?
Es gibt diese Beschreibung auch auf Deutsch! Dort kannst du auch die deutsche messages.yml runterladen! Zur deutschen Beschreibung
Comments