Code Monkey home page Code Monkey logo

advancedban's Introduction

AdvancedBan

Bukkit- & BungeeCord-Plugin at once
Check out our Spigot-Page for more information!

Minecraft Version 1.7-1.12 license GLP-3.0 latest build Codacy Badge

Coded by Leoko

Description

AdvancedBan is an All-In-One Punishment-System with warns, tempwarns, mutes, tempmutes, bans, tempbans, ipbans and kicks. There is also a PlayerHistory so you can see the players past punishments and the plugin has configurable Time & Message-Layouts which automatically calculate and increase the Punishment-Time for certain reasons. AdvancedBan provides also a full Message-File so you can change and translate all messages & a detailed config-file with a lot of useful settings. This is a BungeeCord & Bukkit/Spigot-Plugin in one and it supports MySQL and Local-File-Storage.

API

To use the API just add the AdvancedBan.jar to your BuildPath and as a dependency in your Plugin.yml You can use this API in Bukkit/Spigot-Plugins but also in Bungee-Plugins. The API-Methods can be accessed trough PunishmentManager.get() Here are the currently available methods:

//To get a PlayerUUID use:
UUIDManager.get().getUUID("NAME");

PunishmentManager.get().getPunishments(checkExpired);
// Returns a list of active punishments
// checkExpired - If it should check for expired punishments & remove them | should be on true

PunishmentManager.get().getPunishments(uuid, type, current);
// Returns a list of Punishments
// uuid - Players uuid | null = all players
// type - Type of the punishments PunishmentType-Enum | null = all types
// current - If only currently active punishments should be displayed | true = currently active | false = all
// Example:
PunishmentManager.get().getPunishments(UUIDManager.get().getUUID("Leoko"), PunishmentType.WARNING, true);
// Would return all active Warnings for the player Leoko

PunishmentManager.get().getBan(uuid);
// Returns a Punishment of the type Ban, IPBan or Tempban | returns null if player is not banned

PunishmentManager.get().getMute(uuid);
// Returns a Punishment of the type Mute or Tempmute | returns null if player is not muted

PunishmentManager.get().getMute(id);
// Returns a Punishment of the type Warn or Tempwarn | returns null if there is no warn with that id

PunishmentManager.get().isBanned/isMuted(uuid);
// Returns whether a player is banned or muted

PunishmentManager.get().getCurrentWarns(uuid);
// Returns the count of a players current warnings

//Create a new Punishment:
new Punishment(name, uuid, reason, operator, type, start, end, calculation, id).create();
// name - The users name
// uuid - The users uuid
// reason - The punishment reason | Can be null or a layout like "#LayoutName" or a basic reason "Hacking in FFA"
// operator - The one who banned | You can just use "CONSOLE"
// type - The Type of the Punishment from the PunishmentType-Enum
// start - The current time | use TimeManager.getTime()
// end - The end of the punishment | -1 for perma or TimeManager.getTime() + millisecs for temp
// calculation - TimeLayout | Can just be set to null
// id - has to be set to -1

advancedban's People

Contributors

billygalbreath avatar charliebritton avatar codacy-badger avatar devleoko avatar dutchy1001 avatar itzsomebody avatar minesat avatar stewue avatar zombiehdgaming avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.