Giter VIP home page Giter VIP logo

surge's Introduction

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>

surge's People

Contributors

cyberpwnn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  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.