Collection of common utility classes for Bukkit plugins
Java
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
API
Fallback
Lib
PreRefactor
v1_4_5
v1_4_6
v1_4_R1
v1_5_R1
v1_5_R2
v1_5_R3
v1_6_R1
v1_6_R2
v1_6_R3
v1_7_R1
v1_7_R2
v1_7_R3
v1_7_R4
.gitignore
.travis.yml
README.md
lgpl.txt
pom.xml

README.md

DHUtils

DHUtils is a collection of useful classes for Bukkit plugins.

Building

You will need Maven.

  1. Download DHUtils: "git clone https://github.com/desht/dhutils.git"

  2. Build DHUtils: "mvn install"

Using

DHUtils is intended to be used with Maven, and to be shaded into your plugin. To add it as a Maven dependency:

 <repositories>
   <repository>
      <id>hawkfalcon-repo</id>
      <name>Hawkfalcon Repository</name>
      <url>http://ci.hawkfalcon.com/plugin/repository/everything</url>
   </repository>
   <!-- ...other repositories... -->
 </repositories>

 <dependencies>
   <dependency>
        <groupId>me.desht</groupId>
        <artifactId>dhutils-lib</artifactId>
        <version>LATEST</version>
    </dependency>
    <!-- ...other dependencies... -->
 </dependencies>

To shade it into your plugin:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.5</version>
        <executions>
            <execution>
                <phase>package</phase>
                <goals>
                    <goal>shade</goal>
                </goals>
                <configuration>
                    <minimizeJar>true</minimizeJar>
                    <relocations>
                        <relocation>
                            <pattern>me.desht.dhutils</pattern>
                            <shadedPattern>YOUR.PLUGIN.PACKAGE.dhutils</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
            </execution>
        </executions>
    </plugin>

License

DHUtils is licensed under the LGPL. You may use it freely in your own plugins, but you must make available the source to any modified versions of DHUtils that you distribute in your own plugins.

DHUtils also contains code from the following Bukkit developers:

  • mbaxter - Maven modularisation and NMS library abstraction (see https://github.com/mbax/AbstractionExamplePlugin)

  • codenameB - FireworkEffectPlayer class

  • jascotty2 - Str class

  • sk89q - StringUtils, BlockData, BlockID, BlockType & ClothColor classes