Git Product home page Git Product logo

bukkit-util's Introduction

bukkit-util

This is a collection of utility classes for use with Bukkit plugin development. These are intended to either be included in your project directly, either as source files (though please change the Java package name to avoid conflicts with other plugins using the same classes) or, if you use Maven (and if you don't, why aren't you?), to be included with the Maven Shade plugin, like this:

<project>
  ...
  <repositories>
  ...
    <repository>
      <id>maven-alexanderschroeder-net</id>
      <url>http://maven.alexanderschroeder.net/releases/</url>
    </repository>
  </repositories>
  ...
  <dependencies>
    ...
    <dependency>
      <groupId>net.alexanderschroeder.bukkitutil</groupId>
      <artifactId>BukkitUtil</artifactId>
      <version>1.0.0</version>
    </dependency>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>2.1</version>
        <configuration>
          ...
          <relocations>
            ...
            <relocation>
              <pattern>net.alexanderschroeder.bukkitutil</pattern>
              <shadedPattern>your.project.package.bukkitutil</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

What's important is that you set the value of <shadedPattern> to be unique to your plugin's package name, so Maven changes it when it creates your jar for you.

Also, while it should be obvious, I feel I should mention that you must not place net.alexanderschroeder.bukkitutil:BukkitUtil in the shade plugin's artifactSet's excludes, as that negates the whole point. In fact, make sure you understand exactly how the Maven Shade plugin does before you attempt this, because if you configure it incorrectly, it's going to include the whole Bukkit jar in your jar, and you don't want that.

bukkit-util's People

Contributors

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