Commons - The Server Framework!
Commons isn't just your typical "all in one" plugin. Although it provides many of the features that "Essentials" clones provides, commons is designed to be a framework for developers! Making it simple, fluid, and fun to code an entire server from scratch.
Don't worry any more about the boiler-plating required to design a plugin, simply add Commons as a dependency, and get to making your dreams come true!
Note: Commons is, and always will be a work in progress! I'm open to pull requests, suggestions, and criticism!
The Version of Commons (1.8.8, for example) reflects the version of Minecraft that it's to be used with!
Designed with a very specific vision in mind, I break many of the conventional means which plugins and other API's establish.
As of version 1.8.8-3 Commons supports both YML and XML Serialization via @Annotations in their individual ways; This is a game changing feature for how things will function from here out!
Libraries included in Commons: Simple XML, JavaTuples, Commons-IO, Project Lombok, jOOR, and Reflections.
More features are always being worked on in Commons!
- Annotation based Command System! (Example)
- Simple base for Plugins, and MiniGames
- Easy to use Gadgets System! (Example, Source, Manager Source)
- MiniGame API! (Example, Source, Package)
- State based handling to easily control the flow of your game! (Examples: Pre Game, Game Running, Post Game)
- Custom User class to store per player data! (Example, Source)
- Easily Serialized! Store this data to files without hassle! (Example Coming Soon!)
- User Manager to handle per-player data, in an easy and intuitive way! (Example, Source)
- User Connection Listener to manage custom user data after it's been initialized, much like PlayerJoin and PlayerQuit! (Example)
- Player Management (Source)
- Item Management (Source, Builder, Serialization, Package)
- Blocks Management (Source)
- Chat Management! (Chat, Title [Builder])
- Basic Cuboid Management (Cuboid, Manager, Creator)
- Full Featured Debugger! (Examples, Source)
- Effects API (Particles, Other)
- Entities Management! (Sources)
- Creature Builder
- Entities.class - All interactions you'll need!
- Fireworks API (Sources)
- Inventory Management (Sources)
- Locations Management, and Utilities (Sources)
- Item Menu API! (Sources, Example)
- Easy to use Confirmation Menu! (Source, Example)
- Very Simple NMS Interactions (Package)
- Plugins Management (Source)
- Potions Management (Source)
- Reflection API (Sources)
- Scoreboard Management! (Sources, Examples to come)
- Sounds API (Sources)
- SQL Library (Sources) - By default, Commons holds all player data in a SQL Database! (Soon to follow MongoDB, and File based implementations)
- Threading Library (Sources)
- Time Library (Sources)
- Tons of Utilities! (Sources)
- Warp System (Sources)
- World & Chunk Management (Sources)
- Easy YML Wrapper (Source)
- Register all your commands via their Package
- YAML Serialization via Annotations (Example)
- Extensive in-game debug tools and mode for developers via /debug
- Tons of Already Implemented Commands to use! (Sources)
Commons has a very simple, yet powerful set of configuration options to provide many options to your server!
If you're upgrading to v1.8.8-3 from a previous version
You'll notice that there's now a 'data-option.txt' file in your plugins/Commons directory with a value stating your config choice.
Make your choice by changing this value, and have Commons handle the conversion between.
By default, if you're not upgrading from a previous version, Commons will use a 'yml' based configuration file at 'plugins/Commons/config.yml' though the previously honoured 'xml' configuration is still entirely viable!
Choose your fancy, and enjoy!
Code (Text):# Any concerns regarding the purpose of configuration nodes
# What they affect, or how they change aspects of the API
# are described under the Wiki on Commons GitHub page.
# Used in the chosen database implementation
# to identify the server.
server-name: EDIT THIS
# By default Commons includes a plethora of commands
# Designed to aid you in your server ventures!
# Though if you're not requiring use of these commands, and
# Wish to use Commons for only its API Features, then change this value to
# Allows usage of 'Bukkit:' prefixed commands
# Changing this value to false disable these commands
# from being used on your server.
# Changing the value of this option to false
# Stops players from using '/plugins' on your server.
# Whether or not to enable join messages
# in chat when a player joins the server
# Whether or not to enable leave messages
# in chat when a player leaves the server
# Whether or not to show 'player was kicked'
# messages in chat, when a player is kicked.
# Determines whether or not Commons should
# handle chat formatting (in a very basic manner)
# or to hand it off to another plugin
# When enabled, only players with 'commons.silence.bypass'
# in their permissions will be able to talk
# Determines whether or not to kick a non-premium player
# when a premium user joins the server, and the server
# is currently full.
# Premium users are determined by the 'premium-user-permission'
# node below.
# Message to display to non-premium users after being
# kicked to make room for a premium user.
kick-when-full-message: '&eYou were kicked to make room for a Premium User. Sorry.'
# When enabled, only users with premium (defined by a permission below)
# will be able to join your server.
# Those without premium will be displayed a configurable message
# This message will be shown to non-premium users who join during premium-only mode.
premium-only-mode-kick-message: '&cThis server is currently in premium mode'
# Used to restrict access during premium only mode
# To players who have this permission
# All the options beneath this are used to control
# various aspects of the worlds across all
# the enabled worlds on your server.
# If you have another plugin enabled that also
# Modifies any of these values, there's no guarantee
# that they will function as expected.
# When enabled, players will be teleported to their world spawn when joining the server
# Changes whether or not lightning will strike during a storm
# Changes whether or not thunder will rumble during a storm
# Changes whether or not ice will spread and accumulate
# Changes whether or not snow will accumulate while snowing
# Changes whether or not mycelium will infect blocks around it, and spread
# Changes whether or not fire will spread
# Changes whether or not leaves will decay over time
# When enabled it changes pressure plates into launch pads, like many server hubs have
# Changes whether or not blocks can be broken outside of creative
# Changes if players are able to pick up items that are dropped
# Changes if players are able to drop their items
# Changes whether or not players lose their hunger while playing
# When enabled, fireworks will launch and explode whenever a regular explosion happens
# Changes whether or not players take fall damage
# Maintenance mode enables admins, operators, and users
# with the 'commons.maintenance.join' permission
# to join while the server is undergoing maintenance.
# At the same time, it keeps all players not permitted, out, until
# maintenance is complete!
# Customizable MOTD (Server list message)
# and kick message are available to notify users of
kick-message: '&cThis server is currently undergoing maintenance; Sorry for the
motd: '&aThis server is currently undergoing maintenance'
# Debug options are very useful to developers!
# Providing a StackTraceEvent, and various output options
# which enable in-game players in debug mode
# and developers hooking the event to
# track, handle, change, and work with the headaches of bug fixing
# in an easy and fun manner!
# When enabled in conjunction with stack-trace-event
# users in debug mode will receive a Book in-game outlining
# The error which happened, and it's stack trace written in the books
# When enabled in conjunction with stack-trace-event,
# users in debug mode will receive the stack trace in their chat;
# so eyes don't have to stray from game, to console, to code.
# Note: Can quickly and painfully spam your chat if to many
# errors occur
# When enabled, it provides an interactive GUI
# of which players can use to teleport and interact
# with warps.
The list of commands is quickly growing to be to much to keep on this page; For information about each Command, its syntax, arguments, and permissions: Click here to go to the Wiki.
All the permissions have been copied from the plugin.yml file found inside Commons; Assign them accordingly. Any suggestions for actions that should be restricted via permission, please let me know!
Click here to view a comprehensive list of all the permissions inside Commons, on the Wiki.
Usage, and Tutorials!
To Start, adding 'depend: [Commons]' to your plugin.yml file, inside the plugin you're making, will allow you to use Commons as a dependency on the plugin level.
Next is to add your plugin as a dependency! If you're using maven enter the following information:
Don't want all the commands, and only the API?HTML:<dependency>
Many usage examples are included in the features list above, though if you have any questions regarding a specific usage, class, feature, anything; Ask away! I'll be more than happy to help!
I'm currently moving between provinces and have to wait to my recording setup to be shipped down!
Hopefully you all enjoy Commons, and keep coming back to see what else is on the way! I'll be updating this post, and the library, very frequently.
JavaDocs to come soon!
Requires Java 8!
Check out Commons on Github!
An all in one Framework (API) providing the Essentials for server owners, and developers!