You need maven to use Surge obviously if there is shading involved
In your pom.xml
<repository>
<id>surge</id>
<url>https://raw.githubusercontent.com/cyberpwnn/Central/master/</url>
</repository>
<dependency>
<groupId>org.cyberpwn</groupId>
<artifactId>Surge</artifactId>
<version>1.7</version>
<scope>provided</scope>
</dependency>
Your plugin.yml will no longer specify YOUR plugin. Instead it will specify a ghost plugin inside of surge (which will exist at runtime)
name: YOUR_NAME
version: YOUR_VERSION
main: surge.Main
You do not need to extend java plugin, just create a class like so
import surge.control.Disable;
import surge.control.Enable;
import surge.control.Instance;
import surge.control.Plugin;
@Plugin
public class SomeCoolPlugin
{
// Auto instance creation
@Instance
public SomeCoolPlugin instance;
@Enable
public void enable()
{
// you can call this method whatever you like
}
@Disable
public void disable()
{
// you can call this method whatever you like
}
}
You need to include surge in your jar
In your build section:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>org.cyberpwn:*</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>