Coder Social home page Coder Social logo

bristermitten / plumber Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 1.4 MB

A framework that aims to reduce the Spigot API's boilerplate and simplify Spigot Development

Home Page: https://knightzmc.github.io/plumber/

License: MIT License

Kotlin 100.00%
plumber spigot-api spigot kotlin boilerplate

plumber's Introduction

Plumber

Build Status

Plumber is a framework for the Spigot API to reduce the amount of boilerplate it takes to create high qualtity Minecraft plugins. With all frameworks, it has a learning curve, but the simple DSL and Spring Boot-style annotatation based system makes it easy to pick up. It also encourages best practices - as long as you use what's provided, you'll find yourself writing cleaner, more organised code that does away with static abuse, string concatenation for config files, and messy, buggy event handlers.

At the moment, it's in its infancy, but the potential that comes with Plumber is limitless.

Benefits of Plumber

  • Lack of Boilerplate - No more CommandExecutor, public static MyPlugin getPlugin(), and messy Inventory slot checking. Plumber includes Aikar's powerful ACF for annotation based command handling, and will soon hook in with Fluency, a beautifully simple Inventory API. If that's not enough, Guice brings powerful dependency injection, and Plumber's Configuration library makes working with YAML files effortless.
  • Spigot Compatibility - The Spigot API still exists, don't worry. Any libraries for Spigot will work with Plumber, and if you need that hidden away API component that isn't Plumberified yet, nothing's stopping you from using it.
  • Kotlin Support - Kotlin is a JVM-based language that does away with the long winded syntax of Java, and brings hundreds of useful features with it. Much of Plumber is written in Kotlin, and we highly recommend giving it a try!
  • The Plumber DSL - Inspired by Guice's simple English-based Module configuration DSL, Plumber uses a functional, method chaining approach that results in incredibly readable code that looks something like this
@ScheduledTask
public class AFKChecker {
    
    @Inject
    public AFKChecker(TaskBuilder builder){
        builder.every(10).seconds()
                .doing(this::kickAFK)
                .build().start();
    }
    
    public void kickAFK() {
        for (PPlayer player : server.players()) {
            if (player.lastMoved().moreThan(30).seconds().ago()) {
                player.kick("Kicked for AFK.");
            }
        }
    }
}

It's a thing of beauty.

Get Started

Take a look at the Wiki

Roadmap

  • Implement Fluency
  • Expand DSL
  • Reform Files Aspect
  • Better Aspect support for Aspect configurations, removing boilerplate, etc.
  • Non-Annotation based Aspect searching eg sub-interfaces of Store for Files Aspect
  • Cross-Server communication tools
  • SQL integration

Guidelines

These are mostly for internal reference, but may also help contributors

  • Prefer slower initial loading times than lazy loading or performing slower operations when the server is running

  • Hide implementations from subclasses, but make implementation clear from looking at source code.

plumber's People

Contributors

bristermitten avatar

Stargazers

Adrián Fúnez avatar  avatar Matt avatar  avatar PiggyPiglet avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

untouchedodin0

plumber's Issues

File Size is far too large

Currently the file size for Plumber is much too large for production use. Even with shadowJar exclusions the size is around 6Mb. This needs to be reduced, currently Reflections and Javassist is using most of the size.

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.