Skip to content

Commit

Permalink
Update dependencies, switch to shading bStats from maven, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
cjburkey01 committed Aug 2, 2024
1 parent 84c6fda commit 1e9cf2f
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 993 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[![Plugin Version](https://img.shields.io/static/v1?label=Version&message=0.0.25-FIX3&color=blueviolet&style=for-the-badge)](https://github.com/cjburkey01/ClaimChunk/releases)
[![Maven Central Version](https://img.shields.io/maven-central/v/com.cjburkey.claimchunk/claimchunk?label=Maven%20Central&color=blueviolet&style=for-the-badge)](https://central.sonatype.com/artifact/com.cjburkey.claimchunk/claimchunk)
[![Minecraft Version](https://img.shields.io/static/v1?label=Spigot&message=1.20.6&color=blueviolet&style=for-the-badge)](https://www.spigotmc.org/resources/claimchunk.44458/)
[![Minecraft Version](https://img.shields.io/static/v1?label=Spigot&message=1.21&color=blueviolet&style=for-the-badge)](https://www.spigotmc.org/resources/claimchunk.44458/)
![Java Version](https://img.shields.io/static/v1?label=Java&message=21&color=blueviolet&style=for-the-badge)
[![Servers Using Claimchunk](https://img.shields.io/bstats/servers/5179?label=Servers&color=cornflowerblue&style=for-the-badge)](https://bstats.org/plugin/bukkit/ClaimChunk)
[![Players Using Claimchunk](https://img.shields.io/bstats/players/5179?label=Players&color=cornflowerblue&style=for-the-badge)](https://bstats.org/plugin/bukkit/ClaimChunk)
Expand All @@ -19,7 +19,22 @@ Spigot plugin for 1.20+ allowing the claiming of chunks.

Usage and more information can be found [on the wiki](https://github.com/cjburkey01/ClaimChunk/wiki).

* **1.20-1.20.6+** | The latest version works seamlessly (excluding bugs, of course).
* **1.20-1.21+** | The latest version works seamlessly (excluding bugs, of course).
* **Note for 0.0.23**: When updating the server from 1.20 to 1.21, ClaimChunk will throw errors that it can't find entities by whatever names due to the enum API change.
* If you keep getting those errors on server start, stop the server, open your old profiles at `/plugins/ClaimChunk/worlds/<PROFILE>.txt`, then copy these lines and replace the old (similar looking) ones in each world profile file:
```
_._@B_:
CONTAINER [ CYAN_SHULKER_BOX, BLAST_FURNACE, CHEST_MINECART, GREEN_SHULKER_BOX, MAGENTA_SHULKER_BOX, LIGHT_GRAY_SHULKER_BOX, HOPPER_MINECART, FURNACE, LIGHT_BLUE_SHULKER_BOX, WHITE_SHULKER_BOX, TRAPPED_CHEST, FURNACE_MINECART, GRAY_SHULKER_BOX, LIME_SHULKER_BOX, BREWING_STAND, RED_SHULKER_BOX, PINK_SHULKER_BOX, SMOKER, DISPENSER, PURPLE_SHULKER_BOX, HOPPER, CHEST, BLUE_SHULKER_BOX, BLACK_SHULKER_BOX, ORANGE_SHULKER_BOX, YELLOW_SHULKER_BOX, SHULKER_BOX, BARREL, BROWN_SHULKER_BOX, DROPPER ] ;
DOOR [ MANGROVE_TRAPDOOR, WAXED_COPPER_TRAPDOOR, OAK_TRAPDOOR, WAXED_EXPOSED_COPPER_DOOR, IRON_TRAPDOOR, ACACIA_TRAPDOOR, DARK_OAK_DOOR, BIRCH_TRAPDOOR, CHERRY_TRAPDOOR, BAMBOO_TRAPDOOR, JUNGLE_DOOR, WAXED_COPPER_DOOR, WARPED_TRAPDOOR, COPPER_DOOR, EXPOSED_COPPER_TRAPDOOR, WAXED_OXIDIZED_COPPER_DOOR, CHERRY_DOOR, WAXED_OXIDIZED_COPPER_TRAPDOOR, WARPED_DOOR, WAXED_WEATHERED_COPPER_TRAPDOOR, MANGROVE_DOOR, WAXED_EXPOSED_COPPER_TRAPDOOR, IRON_DOOR, DARK_OAK_TRAPDOOR, CRIMSON_DOOR, SPRUCE_DOOR, BAMBOO_DOOR, BIRCH_DOOR, WAXED_WEATHERED_COPPER_DOOR, ACACIA_DOOR, JUNGLE_TRAPDOOR, COPPER_TRAPDOOR, OXIDIZED_COPPER_TRAPDOOR, CRIMSON_TRAPDOOR, WEATHERED_COPPER_TRAPDOOR, OXIDIZED_COPPER_DOOR, OAK_DOOR, EXPOSED_COPPER_DOOR, SPRUCE_TRAPDOOR, WEATHERED_COPPER_DOOR ] ;
REDSTONE [ DARK_OAK_BUTTON, MANGROVE_BUTTON, BAMBOO_BUTTON, CHERRY_PRESSURE_PLATE, WARPED_PRESSURE_PLATE, ACACIA_PRESSURE_PLATE, BAMBOO_PRESSURE_PLATE, STONE_BUTTON, SPRUCE_PRESSURE_PLATE, DARK_OAK_PRESSURE_PLATE, JUNGLE_PRESSURE_PLATE, BIRCH_PRESSURE_PLATE, POLISHED_BLACKSTONE_PRESSURE_PLATE, CRIMSON_BUTTON, ACACIA_BUTTON, HEAVY_WEIGHTED_PRESSURE_PLATE, CRIMSON_PRESSURE_PLATE, CHERRY_BUTTON, OAK_BUTTON, LEVER, STONE_PRESSURE_PLATE, BIRCH_BUTTON, MANGROVE_PRESSURE_PLATE, SPRUCE_BUTTON, POLISHED_BLACKSTONE_BUTTON, WARPED_BUTTON, LIGHT_WEIGHTED_PRESSURE_PLATE, OAK_PRESSURE_PLATE, JUNGLE_BUTTON ] ;
SIGN [ WARPED_HANGING_SIGN, ACACIA_HANGING_SIGN, JUNGLE_WALL_HANGING_SIGN, OAK_HANGING_SIGN, BIRCH_WALL_HANGING_SIGN, BAMBOO_WALL_SIGN, ACACIA_WALL_SIGN, CHERRY_WALL_SIGN, ACACIA_SIGN, OAK_SIGN, BAMBOO_HANGING_SIGN, DARK_OAK_SIGN, BIRCH_WALL_SIGN, BAMBOO_SIGN, DARK_OAK_HANGING_SIGN, SPRUCE_WALL_HANGING_SIGN, DARK_OAK_WALL_SIGN, CRIMSON_HANGING_SIGN, MANGROVE_HANGING_SIGN, CRIMSON_WALL_SIGN, CHERRY_HANGING_SIGN, CRIMSON_WALL_HANGING_SIGN, BIRCH_SIGN, BIRCH_HANGING_SIGN, BAMBOO_WALL_HANGING_SIGN, SPRUCE_HANGING_SIGN, MANGROVE_WALL_HANGING_SIGN, OAK_WALL_HANGING_SIGN, WARPED_WALL_HANGING_SIGN, OAK_WALL_SIGN, ACACIA_WALL_HANGING_SIGN, SPRUCE_SIGN, SPRUCE_WALL_SIGN, MANGROVE_SIGN, CRIMSON_SIGN, WARPED_SIGN, CHERRY_SIGN, JUNGLE_HANGING_SIGN, DARK_OAK_WALL_HANGING_SIGN, MANGROVE_WALL_SIGN, CHERRY_WALL_HANGING_SIGN, JUNGLE_WALL_SIGN, WARPED_WALL_SIGN, JUNGLE_SIGN ] ;
_._@E_:
ANIMALS [ MOOSHROOM, MULE, FROG, HOGLIN, LLAMA, SHEEP, ARMADILLO, POLAR_BEAR, CHICKEN, TURTLE, CAMEL, TRADER_LLAMA, ZOMBIE_HORSE, SNIFFER, BEE, HORSE, SKELETON_HORSE, PARROT, COW, FOX, PIG, AXOLOTL, CAT, GOAT, RABBIT, WOLF, STRIDER, DONKEY, PANDA, OCELOT ] ;
HANGING_ENTITIES [ GLOW_ITEM_FRAME, ITEM_FRAME, PAINTING, LEASH_KNOT ] ;
MONSTERS [ ENDERMAN, SILVERFISH, ZOMBIE_VILLAGER, HUSK, VEX, WARDEN, VINDICATOR, WITCH, SPIDER, PILLAGER, SKELETON, WITHER_SKELETON, PIGLIN_BRUTE, WITHER, CREEPER, BOGGED, ILLUSIONER, ZOMBIFIED_PIGLIN, BREEZE, CAVE_SPIDER, RAVAGER, DROWNED, GUARDIAN, EVOKER, ELDER_GUARDIAN, BLAZE, PIGLIN, ENDERMITE, GIANT, STRAY, ZOGLIN, ZOMBIE ] ;
VEHICLES [ SPAWNER_MINECART, COMMAND_BLOCK_MINECART, CHEST_BOAT, CHEST_MINECART, MINECART, TNT_MINECART, FURNACE_MINECART, HOPPER_MINECART, BOAT ] ;
```
* **1.17 - 1.20** | The latest *known* working version is [0.0.23-RC8](https://github.com/cjburkey01/ClaimChunk/releases/tag/0.0.23-RC8).
* Newer versions of the plugin will require Java 17, but may still work.
* **1.13 - 1.16.5** | The latest working version is [0.0.22](https://github.com/cjburkey01/ClaimChunk/releases/tag/0.0.22).
Expand All @@ -34,6 +49,9 @@ may make an issue, and I should be able to help, but I won't be bringing newer f
"minor bug support" status. Version 0.0.23 will be supported for slightly longer though, as this transition period may
get funky.
I'm keeping the Spigot API version I build against for 1.20.6 for a while, about 25% of server owners reporting
anonymous data (to bStats.org) still use 1.20.4, but 30ish% use 1.21, so the goal is compatibility with both versions at least.
For even more information, the SpigotMC page can be found [here](https://www.spigotmc.org/resources/claimchunk.44458/).
Download
Expand Down Expand Up @@ -104,7 +122,7 @@ implementation("com.cjburkey.claimchunk:claimchunk:0.0.25-FIX3")
Building
--------
[![Automatic Build](https://img.shields.io/github/actions/workflow/status/cjburkey01/ClaimChunk/gradle.yml?branch=main&style=for-the-badge)](https://claimchunk.cjburkey.com/server/Downloads.html#snapshot-downloads)
[![Version Info](https://img.shields.io/static/v1?label=Repository%20Version&message=0.0.25-FIX3&color=ff5555&style=for-the-badge)](https://github.com/cjburkey01/ClaimChunk/archive/main.zip)
[![Version Info](https://img.shields.io/static/v1?label=Repository%20Version&message=0.0.25-FIX4&color=ff5555&style=for-the-badge)](https://github.com/cjburkey01/ClaimChunk/archive/main.zip)

If you want to obtain a version of the plugin that isn't available yet (like a snapshot), you can do so by asking on the
Discord or building it yourself. Here's how to build it yourself:
Expand Down
39 changes: 23 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ plugins {
id("io.freefair.lombok") version "8.6"
// Including dependencies in final jar
id("io.github.goooler.shadow") version "8.1.8"
id("com.vanniktech.maven.publish") version "0.28.0"
id("com.vanniktech.maven.publish") version "0.29.0"
}

object DepData {
const val JAVA_VERSION = 21

const val LIVE_VERSION = "0.0.25-FIX3"
const val THIS_VERSION = "0.0.25-FIX3"
const val THIS_VERSION = "0.0.25-FIX4"
const val PLUGIN_NAME = "ClaimChunk"
const val ARCHIVES_BASE_NAME = "claimchunk"
const val MAIN_CLASS = "com.cjburkey.claimchunk.ClaimChunk"
Expand All @@ -28,21 +28,22 @@ object DepData {
const val SPIGOT_REV = "1.21"

// Dependency versions
const val BUKKIT_VERSION = "1.20.4-R0.1-SNAPSHOT"
const val SPIGOT_VERSION = "1.20.4-R0.1-SNAPSHOT"
const val LATEST_MC_VERSION = "1.20.6"
const val VAULT_API_VERSION = "1.7"
const val WORLD_EDIT_CORE_VERSION = "7.2.9"
const val WORLD_GUARD_BUKKIT_VERSION = "7.0.7"
const val PLACEHOLDER_API_VERSION = "2.11.1"
const val JETBRAINS_ANNOTATIONS_VERSION = "23.0.0"
const val JUNIT_VERSION = "5.10.2"
const val JUNIT_LAUNCHER_VERSION = "1.10.2"
const val BUKKIT_VERSION = "1.20.6-R0.1-SNAPSHOT"
const val SPIGOT_VERSION = "1.20.6-R0.1-SNAPSHOT"
const val LATEST_MC_VERSION = "1.21"
const val VAULT_API_VERSION = "1.7.1"
const val WORLD_EDIT_CORE_VERSION = "7.3.5"
const val WORLD_GUARD_BUKKIT_VERSION = "7.0.10"
const val PLACEHOLDER_API_VERSION = "2.11.6"
const val JETBRAINS_ANNOTATIONS_VERSION = "24.1.0"
const val JUNIT_VERSION = "5.10.3"
const val JUNIT_LAUNCHER_VERSION = "1.10.3"
const val SQLITE_JDBC_VERSION = "3.42.0.1"
const val JAVAX_PERSISTENCE_VERSION = "2.1.0"
const val JAVAX_TRANSACTION_VERSION = "1.1"
const val SANS_ORM_VERSION = "3.17"
const val SLF4J_VERSION = "1.7.25"
const val BSTATS_VERSION = "3.0.2"

// Directories
const val TEST_SERVER_DIR = "run"
Expand Down Expand Up @@ -96,7 +97,7 @@ tasks {
// We don't actually include any other libraries now
// (except smartcommanddispatcher, but we do that manually)
shadowJar {
mustRunAfter("updateReadme")
mustRunAfter("googleFormat", "updateReadme")

// Set the jar name and version
archiveBaseName.set(DepData.ARCHIVES_BASE_NAME)
Expand All @@ -114,6 +115,7 @@ tasks {
relocate("javax.transaction", "claimchunk.dependency.javax.transaction")
relocate("org.eclipse", "claimchunk.dependency.org.eclipse")
relocate("org.osgi", "claimchunk.dependency.org.osgi")
relocate("org.bstats", "claimchunk.dependency.org.bstats")
}

test {
Expand Down Expand Up @@ -218,15 +220,15 @@ tasks {

// Copy from the libs dir to the plugins directory in the testServerDir
register<Copy>("copyClaimChunkToPluginsDir") {
mustRunAfter("copyClaimChunkToOutputDir")
dependsOn("copyClaimChunkToOutputDir")
description = "Copies ClaimChunk from the build directory to the test server plugin directory."

from(shadowJar)
into(mainDir.dir("${DepData.TEST_SERVER_DIR}/plugins"))
}

register<Copy>("copyClaimChunkToOutputDir") {
mustRunAfter("updateReadme")
mustRunAfter("clean", "build", "updateReadme")
description = "Copies ClaimChunk from the build directory to the output directory."

from(shadowJar)
Expand Down Expand Up @@ -265,6 +267,8 @@ tasks {
}
}

task<Jar>("sourcesJar").mustRunAfter("googleFormat")


// -- DEPENDENCIES -- //

Expand All @@ -274,11 +278,13 @@ repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://hub.spigotmc.org/nexus/content/groups/public/")
maven("https://maven.enginehub.org/repo/")
maven("https://repo.mikeprimm.com")
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://eldonexus.de/repository/maven-public")
maven("https://jitpack.io")

// Why do you have to be special, huh?
maven {
Expand All @@ -291,7 +297,7 @@ dependencies {
// Things needed to compile the plugin
compileOnly("org.jetbrains:annotations:${DepData.JETBRAINS_ANNOTATIONS_VERSION}")
compileOnly("org.spigotmc:spigot-api:${DepData.SPIGOT_VERSION}")
compileOnly("net.milkbowl.vault:VaultAPI:${DepData.VAULT_API_VERSION}")
compileOnly("com.github.MilkBowl:VaultAPI:${DepData.VAULT_API_VERSION}")
compileOnly("com.sk89q.worldedit:worldedit-core:${DepData.WORLD_EDIT_CORE_VERSION}")
compileOnly("com.sk89q.worldguard:worldguard-bukkit:${DepData.WORLD_GUARD_BUKKIT_VERSION}")
compileOnly("me.clip:placeholderapi:${DepData.PLACEHOLDER_API_VERSION}")
Expand All @@ -301,6 +307,7 @@ dependencies {
implementation("org.eclipse.persistence:javax.persistence:${DepData.JAVAX_PERSISTENCE_VERSION}")
implementation("javax.transaction:transaction-api:${DepData.JAVAX_TRANSACTION_VERSION}")
implementation("com.github.h-thurow:q2o:${DepData.SANS_ORM_VERSION}")
implementation("org.bstats:bstats-bukkit:${DepData.BSTATS_VERSION}")

testImplementation("org.slf4j:slf4j-simple:${DepData.SLF4J_VERSION}")
testImplementation("org.junit.jupiter:junit-jupiter:${DepData.JUNIT_VERSION}")
Expand Down
Loading

0 comments on commit 1e9cf2f

Please sign in to comment.