Skip to content

A quick, shade-able api for making bukkit plugins quickly

Notifications You must be signed in to change notification settings

cyberpwnn/Surge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compiling with your Plugin

You need maven to use Surge obviously if there is shading involved

1. Add the maven coordinates to your pom

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>

2. Update your plugin.yml

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

3. Create a Plugin class

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
	}
}

4. Configure your pom SHADE plugin

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>

About

A quick, shade-able api for making bukkit plugins quickly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages