Git Product home page Git Product logo

foundation's Introduction

Foundation enables people develop Minecraft plugins faster, saving boilerplate code and so that you can focus on what matters the most, putting your ideas into reality.

Some features include:

  • GUI menu APIs
  • Compatibility wrappers: Example: Send title/animations/packets on multiple MC versions with a single call
  • Advanced command system without the need of editing plugin.yml
  • Localization support
  • Third party hooks: Packets, Discord, Citizens, Towny, etc.
  • Auto-updating configuration with comments support
  • Time-saving wrappers: Databases (flatfile SQL, HikariCP, MySQL), holograms API, custom items and skulls API, and so much more!

Thousands of servers are running on Foundation since 2013. It has been battle tested and proven in plugins ChatControl, Boss, CoreArena, Confiscate, AutoPlay, Puncher, Winter, AnimeX and others.

Quick Start

  1. Import Foundation using Maven/Gradle (see the Importing section).
  2. Change "extends JavaPlugin" to "extends SimplePlugin" (we need that to register things and listeners on our end automatically)
  3. Change onEnable() to onPluginStart() and onDisable() to onPluginStop() (we occupy these methods to perform logic)
  4. If you use a static getInstance() method in your main plugin's class, change it to return (T) SimplePlugin.getInstance() where T is your plugin instead. Delete the instance of your plugin from your class if you use it (if you have myPlugin = this anywhere, remove it).

For a sample plugin, see PluginTemplate.

A complete tutorial on how to use this library is a part of our Project Orion training available here

Importing

We use JitPack to automatically compile and host the latest release of Foundation for you.

a) Method 1 - (Recommended) JitPack:

To install Foundation with Maven, open your pom.xml, locate the <repositories> section and place this repository within it:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

Then locate the <dependencies> section of your pom.xml and place the following inside of it. Replace the "REPLACE_WITH_LATEST_VERSION" string with the latest version from: https://github.com/kangarko/Foundation/releases

<dependency>
    <groupId>com.github.kangarko</groupId>
    <artifactId>Foundation</artifactId>
    <version>REPLACE_WITH_LATEST_VERSION</version>
</dependency>

For more information, including how to use Foundation with other tools than Maven, please visit: https://jitpack.io/#kangarko/Foundation/

b) Method 2 - Downloading to disk:

This is great if you want to make changes to Foundation to suit your needs. After you downloaded and compiled Foundation (run maven "clean install" goal), do not place any repository to your pom.xml file, instead, only place the following dependency. Notice the groupId is different. You can use the LATEST keyword to automatically synchronize changes you make to your local copy of Foundation with your plugin source code.

<dependency>
    <groupId>org.mineacademy</groupId>
    <artifactId>Foundation</artifactId>
    <version>LATEST</version>
</dependency>

Compatibility

We aim to provide broad compatibility layer enabling the below Minecraft versions to work:

  • 1.2.5 (from 2012) - Limited, see mineacademy.org/oldmcsupport for setup instructions.
  • 1.3.2, 1.4.7, 1.5.2, 1.6.4 - Many APIs are missing due to lack of features/access.
  • 1.7.10
  • 1.8.8
  • 1.9.x, 1.10.x, 1.11.x, 1.12.x
  • 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x
  • We continously update for newer versions but sometimes forget to update it here, but it does not mean that the library is incompatible!

foundation's People

Contributors

kangarko avatar apexampleready avatar elbananaa avatar md5sha256 avatar tvhee-dev avatar coobmc avatar mrcrazys avatar adrianjanocko avatar monkamaczna avatar broken1arrow avatar mynameisares avatar lorenzo0111 avatar lenjoyofficial avatar katalijst avatar gamer153 avatar epicgodmc202 avatar elroykr avatar emiljimenez21 avatar magnum97 avatar tnt10128 avatar

Stargazers

 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.