psygate / CivModCore

Plugin Core and general purpose API for Civ Plugins - Updated for Spigot 1.14.4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CivModCore

CivModCore is derived from Humbug.


Versions

  • 2.0.0 - Paper 1.18.1 - This version onwards requires gradle

  • 1.9.0 - Paper 1.17.1

  • 1.8.4 - Paper 1.16.5

  • 1.8.0 - Paper 1.16.1

  • 1.7.9 - Spigot 1.14.4

  • 1.6.1 - Spigot 1.12.2 (Mercury Removed -- incompatible with plugins that rely on Mercury hooks)

  • 1.5.11 - Spigot 1.11.x

  • 1.5.9 - Spigot 1.10.x

No explicit backwards support is offered to any previous version, whether it be major, minor, or patch.


##How to compile with Gradle

To compile CivModCore, you need JDK 17.

Clone this repo, run ./gradlew reobfJar to create your jar, You can find the compiled jar in the paper build/libs directory.

To get a full list of tasks, run ./gradlew tasks.


Usage

To take full advantage of CivModCore, you should have your plugin class extend ACivMod, like such:

public class MyNewPlugin extends ACivMod {

    @Override
    public void onEnable() {
        // Always have this at the top of the function
        super.onEnable();
        
        // Then do your stuff here that you need to do.
    }

    @Override
    public void onDisable() {
        // Do whatever you need to do here
    
        // Try to keep this at the bottom of the function
        super.onDisable();
    }

}

For more information, look through the CivTemplate plugin.


Dependency

Include the following in your dependency list in your plugin's POM file:

<dependency>
    <groupId>net.civmc</groupId>
    <artifactId>CivModCore</artifactId>
    <version>2.0.0-SNAPSHOT</version>
    <scope>provided</scope>
</dependency>

For Gradle include the following line inside your dependencies code block:

implementation("net.civmc:civmodcore:2.0.0-SNAPSHOT:dev-all")

About

Plugin Core and general purpose API for Civ Plugins - Updated for Spigot 1.14.4

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Java 99.8%Language:Kotlin 0.2%