https://github.com/axelrindle/pocketknife
:recycle: Utilities and reusable components to simplify the process of creating a Bukkit/Spigot plugin.
https://github.com/axelrindle/pocketknife
api bukkit bukkit-plugin papermc reusable-components spigot spigot-plugin utils
Last synced: about 2 months ago
JSON representation
:recycle: Utilities and reusable components to simplify the process of creating a Bukkit/Spigot plugin.
- Host: GitHub
- URL: https://github.com/axelrindle/pocketknife
- Owner: axelrindle
- License: apache-2.0
- Created: 2018-06-09T21:21:03.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2022-04-11T20:28:20.000Z (about 4 years ago)
- Last Synced: 2025-10-11T08:18:59.787Z (8 months ago)
- Topics: api, bukkit, bukkit-plugin, papermc, reusable-components, spigot, spigot-plugin, utils
- Language: Kotlin
- Homepage: https://axelrindle.gitbook.io/pocketknife/
- Size: 28 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

----
----
# PocketKnife
> :recycle: Utilities and reusable components to simplify the process of creating a Bukkit/Spigot plugin.
## Get Started
### Installation
If not already done, add the `JitPack` repository and the dependency:
#### Repository
```gradle
maven { url 'https://jitpack.io' }
```
#### Dependency
```gradle
implementation 'com.github.axelrindle:PocketKnife:LATEST_VERSION'
```
#### Package relocation
To avoid classpath conflicts with other plugins using the same dependencies, dependencies should be relocated to a unique package. More information [can be found here](https://imperceptiblethoughts.com/shadow/configuration/relocation/).
The following Gradle configuration relocates all dependencies using the `shadow` plugin, that will be included in the jar file, to a new location:
```groovy
plugins {
id 'com.github.johnrengelman.shadow' version '6.1.0'
}
shadowJar {
archiveClassifier.set('') // remove the 'all' suffix
}
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
task relocateShadowJar(type: ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = "mypluginshadow" // Default value is "shadow"
}
tasks.shadowJar.dependsOn tasks.relocateShadowJar
```
Afterwards a jar file can be built by running the Gradle task `shadowJar`.
### Usage
Documentation is moving to [GitBook](https://axelrindle.gitbook.io/pocketknife/).
## Used by
- [Broadcaster](https://github.com/axelrindle/Broadcaster-Plugin)
- [SimpleCoins](https://github.com/axelrindle/SimpleCoins)
*Feel free to add your plugin here by sending a pull request.*
## License
[Apache-2.0](LICENSE)
### Copyright notices
- [pocket knife by teleymon from the Noun Project](https://thenounproject.com/icon/923802/)