Code Monkey home page Code Monkey logo

felixklauke / isabelle Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 183 KB

Integrating minecraft spigot servers plugin lifecycle into Netflix' Governators lifecycle extensions and provide an effective framework featuring dependency injection, configuration mapping and some general governator features for spigot plugins.

License: MIT License

Java 100.00%
spigot spigot-plugins lifecycle-management governator netflix spigot-server spigot-mc dependency-injection configuration-management configuration-mapping

isabelle's Introduction

isabelle

Integrating minecraft spigot servers plugin lifecycle into lifecycle extensions and provide an effective framework featuring dependency injection, configuration mapping and some general governator features for spigot plugins.

Integrations:

  1. Theresa - My own dependency injection framework based on Guice
  2. Governator - A dependency injection framework based on Google developed by Netflix. In maintenance mode and therefor deprecated.

Status

Build Status Test Code Coverage
Master Build Status codecov
Development Build Status codecov

Maven & Gradle

Maven Repositories

<repositories>
    <!-- Klauke Enterprises Releases -->
    <repository>
        <id>klauke-enterprises-maven-releases</id>
        <name>Klauke Enterprises Maven Releases</name>
        <url>https://repository.klauke-enterprises.com/repository/maven-releases/</url>
    </repository>
	
    <!-- Klauke Enterprises Snapshots -->
    <repository>
        <id>klauke-enterprises-maven-snapshots</id>
        <name>Klauke Enterprises Maven Snapshots</name>
        <url>https://repository.klauke-enterprises.com/repository/maven-snapshots/</url>
    </repository>
</repositories>

Maven dependencies

<dependency>
   <groupId>de.d3adspace.isabelle</groupId>
   <artifactId>isabelle-spigot-governator</artifactId>
   <version>1.2.0</version>
</dependency>

How it works

Isabelle provides a single endpoint class called IsabelleSpigotExtension (de.d3adspace.isabelle.spigot.governator.IsabelleSpigotExtension). Instead of using the well known JavaPlugin you just have to extend our class and the magic begins. You can take a look at https://github.com/Isariel/laura/blob/dev/spigot/src/main/java/de/d3adspace/laura/spigot/extension/LauraSpigotExtension.java for a full featured example but you can also do a quick start with our internal example.

Basic structure:

package de.d3adspace.isabelle.spigot.plugin;

import de.d3adspace.isabelle.spigot.governator.IsabelleSpigotExtension;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.util.logging.Level;

/**
 * @author Felix Klauke <[email protected]>
 */
public class ExamplePlugin extends IsabelleSpigotExtension {

    @PostConstruct
    public void onPostConstruct() {
        exampleService.executeAwesomeActions();

        getLogger().log(Level.INFO, "Entering post construction phase.");
    }

    @PreDestroy
    public void onPreDestroy() {

        getLogger().log(Level.INFO, "Entering pre deconstruction phase.");
    }
}

You can find the corresponding full example source here: https://github.com/FelixKlauke/isabelle/blob/dev/isabelle-spigot-governator-example/src/main/java/de/d3adspace/isabelle/spigot/plugin/ExamplePlugin.java

Depdendency Injection: As we use Governator/Theresa and Guice under the hood we have a powerful dependency injection mechanism.

isabelle's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar felixklauke avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

isabelle's Issues

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.