Skip to content

General purpose API for srnyx's plugins

License

Notifications You must be signed in to change notification settings

clickednebula3/annoying-api

 
 

Repository files navigation

Annoying API Release

General purpose API for my plugins. Just contains some utility classes and methods. Okay... it contains a tad bit more than that...

Server Owners

All of my plugins use AnnoyingAPI, however, they all come pre-packaged with it. So, you don't need to install it separately.

This may be different for other plugins that aren't mine, though. Just check their plugin pages / dependency lists to see if you need to install AnnoyingAPI separately.

Download (read above)

Developers

You can find the Javadocs at jitpack.io/com/github/srnyx/annoying-api/latest/javadoc/ (wiki coming soon, hopefully)

Importing

You can import the API using Jitpack. It's HIGHLY recommended to implement the API, all the examples below will implement it. Make sure to replace VERSION with the version you want.

  • Gradle Kotlin (build.gradle.kts):
// Required plugins
plugins {
  java
  id("com.github.johnrengelman.shadow") version "7.1.2" // https://github.com/johnrengelman/shadow/releases/latest
}
// Jitpack repository
repositories {
  maven("https://jitpack.io")
}
// AnnoyingAPI dependency declaration
dependencies {
    implementation("xyz.srnyx", "annoying-api", "VERSION")
}
// It's recommended to relocate the API to avoid conflicts
tasks {
  build {
    relocate("xyz.srnyx.annoyingapi", "YOUR.PACKAGE.annoyingapi")
  }
}
  • Gradle Groovy (build.gradle):
// Required plugins
plugins {
  id 'java'
  id 'com.github.johnrengelman.shadow' version '7.1.2' // https://github.com/johnrengelman/shadow/releases/latest
}
// Jitpack repository
repositories {
    maven { url = 'https://jitpack.io' }
}
// AnnoyingAPI dependency declaration
dependencies {
    implementation 'xyz.srnyx:annoying-api:VERSION'
}
// It's recommended to relocate the API to avoid conflicts
shadowJar {
    relocate 'xyz.srnyx.annoyingapi', 'YOUR.PACKAGE.annoyingapi'
}
  • Maven (pom.xml):
    • Shade plugin
    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.4.1</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
          <!-- Exclude resources to avoid conflicts -->
            <filters>
              <filter>
                <artifact>xyz.srnyx:*</artifact>
                <excludes>
                  <exclude>META-INF/*.MF</exclude>
                  <exclude>plugin.yml</exclude>
                </excludes>
              </filter>
            </filters>
            <relocations>
            <!-- It's recommended to relocate the API to avoid conflicts -->
              <relocation>
                  <pattern>xyz.srnyx.annoyingapi</pattern>
                  <shadedPattern>YOUR.PACKAGE.annoyingapi</shadedPattern>
              </relocation>
            </relocations>
          </configuration>
        </plugin>
      </plugins>
    </build>
    • Jitpack repository
     <repositories>
          <repository>
              <id>jitpack</id>
              <url>https://jitpack.io</url>
          </repository>
      </repositories>
    • AnnoyingAPI dependency declaration
      <dependencies>
          <dependency>
              <groupId>xyz.srnyx</groupId>
              <artifactId>annoying-api</artifactId>
              <version>VERSION</version>
          </dependency>
      </dependencies>

About

General purpose API for srnyx's plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 97.5%
  • Kotlin 2.5%