Giter Club home page Giter Club logo

jefflib's Introduction

JeffLib Spigot Library

Javadocs Discord Donate

JeffLib includes a ton of useful methods that you would normally have to write yourself. Check the Javadocs for an overview.

Maven

Repository

<repository>
    <id>jeff-media-gbr</id>
    <url>https://hub.jeff-media.com/nexus/repository/jeff-media-public/</url>
</repository>

Dependency

<dependency>
    <groupId>com.jeff_media</groupId>
    <artifactId>JeffLib</artifactId>
    <version><!-- Check latest verion in pom.xml --></version>
    <scope>compile</scope>
</dependency>

Relocation

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.3.0</version>
    <configuration>
        <minimizeJar>true</minimizeJar>
        <relocations>
            <relocation>
                <pattern>com.jeff_media.jefflib</pattern>
                <shadedPattern>YOUR.PACKAGE</shadedPattern>
            </relocation>
        </relocations>
        <filters>
            <filter>
                <artifact>*:*</artifact>
                <excludeDefaults>false</excludeDefaults>
                <includes>
                    <include>com/jeff_media/jefflib/internal/nms/**</include>
                </includes>
            </filter>
            <filter>
                <artifact>*:*</artifact>
                <excludes>
                    <exclude>META-INF/**</exclude>
                </excludes>
            </filter>
        </filters>
    </configuration>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Usage

Just include JeffLib as dependency in your pom.xml.

Note: Some methods require an instance of your plugin. JeffLib tries to get it automatically, however this only works if your plugin has already been enabled. If you need to access methods that need an instance of your plugin (for example PDCUtils), then please pass your plugin instance to JeffLib.init(Plugin) as soon as possible:

public class MyPlugin extends JavaPlugin {
    {
        // Only needed if you access JeffLib before your onEnable() gets called
        JeffLib.init();
    }
}

Note: If you use methods annotated with "@RequiresNMS", you have to enable NMS support:

public class MyPlugin extends JavaPlugin {
    {
        // Only needed if you use methods annotated with @RequiresNMS
        JeffLib.enableNMS();
    }
}

Obfuscation settings

If you're using allatori to obfuscate your plugin, you need the following additional settings:

<ignore-classes>
  <class template="class **.nms.**" />
</ignore-classes>

JavaDocs

https://hub.jeff-media.com/javadocs/jefflib/

jefflib's People

Contributors

mfnalex avatar n-tdi avatar sachingorkar102 avatar pseudoforceyt 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.