Skip to content

GDHooks (Snowbird fork)

Snowbird fork of GDHooks: shows GriefDefender claims on the BlueMap web map, with fixes for this network. Upstream GDHooks cannot do this on our servers, so we keep our own build.

What it does

  • Draws every GriefDefender claim (except wilderness) as a colored shape on BlueMap.
  • Makes one marker layer per claim type (admin, basic, subdivision, town, and so on) on each BlueMap map. Players can toggle the layers on the web map.
  • Clicking a claim shows a popup with its name, owner, type, last-seen date, and trust lists.
  • Updates the map about one second after a claim is created, changed, or removed.

What our fork changes from upstream (bloodmc/GDHooks, branch dev):

Change Why
Ported the BlueMap provider from BlueMap API 1.5 to API 2.x We run BlueMap 5.7, which removed the old marker API
Maps Bukkit worlds to BlueMap worlds by hand BlueMap runs as a NeoForge mod here. Its world ids look like world#minecraft:the_nether, and it does not know Bukkit worlds
Detects BlueMap by class, not by Bukkit plugin A NeoForge mod is never a Bukkit plugin, so upstream never turned the provider on
Accepts Minecraft 1.19 to 1.21 Upstream refused to load past 1.18. We use its newest (1.18) library list
Starts map providers before commands, and catches command errors The old command library must not be able to break the map
Fixed a crash when a claim type had no style Upstream skipped a null check
Builds on Java 21, Gradle 8, Paper API 1.21.1 Upstream targeted Java 8 and 1.16
Removed every shop, clan, mob, item, mcMMO, and squaremap integration None run on this network, several are paid, and upstream did not compile with them. Only BlueMap and Dynmap are built

How players use it

Players do not run any commands. Open the BlueMap web map and look for the "GriefDefender ... Claims" layers in the marker menu. Click a claim to see who owns it and who is trusted.

Staff guide

Task Command Permission
Reload config.conf and the language file /gdhooks reload (or /gdhooksreload) gdhooks.admin.command.reload
Show the version /gdhooks version (or /gdhooksversion) gdhooks.user.command.version

These nodes are not declared in plugin.yml, so only ops have them unless you grant them in LuckPerms.

To check a claim shows up: create or resize a claim, wait a few seconds, and refresh BlueMap. Removing a claim should remove its shape. Claim removal had not been seen live when the fork was tested, so check it after any change.

Configuration

File: plugins/GDHooks/config.conf (HOCON). Language text: plugins/GDHooks/lang/<locale>.conf.

/gdhooks reload re-reads the files, but the BlueMap provider keeps the settings it started with. Restart the server for BlueMap changes (labels, colors, popups, hiding).

Keys people change, all under bluemap:

Key What it is for
enabled Turn the BlueMap claim layers on or off. Also needs provider.BlueMap = true
markerset-admin-label, -basic-label, -subdivision-label, -town-label Layer names in the BlueMap menu
hide-by-default-admin, -basic, -subdivision, -town Start a layer hidden
depth-check Hide shapes behind terrain
claimtype-styles.<type> line-color, fill-color, stroke-opacity, fill-opacity per claim type
owner-styles.<owner name> Same, for one owner's claims (wins over the type style)
info-window-basic, info-window-admin Popup HTML. Uses %claimname%, %owner%, %owneruuid%, %gdtype%, %lastseen%, %managers%, %builders%, %containers%, %residents%, %accessors%

The provider section still lists every upstream integration. Only BlueMap and dynmap do anything in this build. Dynmap is not installed on this network.

Data and storage

  • plugins/GDHooks/config.conf and plugins/GDHooks/lang/: settings and text.
  • plugins/GDHooks/lib/: libraries the plugin downloads on first start (command framework, Configurate, commons). Safe to delete; they download again at the next start.
  • Claim shapes are stored by BlueMap itself, in marker sets named griefdefender-marker-<type>. GDHooks rebuilds them at every start.

GDHooks keeps no player data. Claims belong to GriefDefender.

Troubleshooting

Symptom Cause Fix
Detected unsupported version ... GDHooks will NOT load. Upstream jar, or a Minecraft version past 1.21 Use this fork's jar; extend the version check in GDHooksBootstrap for newer versions
BlueMap not detected ... skipping Bluemap provider. BlueMap is not installed Install BlueMap
Bluemap: no BlueMap world matches Bukkit world '<name>' All three world-matching methods missed Claims in that world will not show. Compare BlueMap world ids with Bukkit world names
Bluemap provider could not match any Bukkit world ... No world matched at all Same as above, for every world
Claim layers vanish after /bluemap reload and do not come back BlueMap restarted its API GDHooks rebuilds on BlueMap's enable event. If not, restart the server
Could not register GDHooks commands ... The old command library failed Map still works. /gdhooks is unavailable
A layer is called plot No label key exists for plot claims Cosmetic

Good boot lines:

[GDHooks] Detected 1.21.1-... (MC: 1.21.1); using the 1.18.0 library manifest (newest upstream ships).
[GDHooks] Initializing GriefDefender Bluemap provider...
[GDHooks] Bluemap: 'world' -> BlueMap world 'world#minecraft:overworld' maps=[world]
[GDHooks] Bluemap provider is activated

On main you should see one Bluemap: '<world>' -> ... line for each of world, DIM-1, DIM1, ultra_space, and debug.

Maintainer notes

  • World matching tries, in order: BlueMap's own lookup (works if BlueMap is ever the Paper build), the save folder, then the dimension key after # in the BlueMap world id. The log says which one matched. Many BlueMap maps share one save folder, so matching on folder name alone is not enough.
  • A Bukkit plugin can see the NeoForge mod's BlueMap classes on Youer. GriefDefender relocates its own flowpowered math library, so it does not clash with BlueMap's copy.
  • Marker sets are per map in API 2.x, so the provider keeps one set per (map, claim type). Claim shapes extend the far corner by one block, because GriefDefender corners are inclusive.
  • The jar is a jar-in-jar: a small loader wraps gdhooks-bukkit.jarinjar. This needs the shadow plugin, unlike our own plugins.
  • The 1.18 library manifest is used for 1.19 to 1.21. Its libraries are relocated under com.griefdefender.lib.*, so they cannot clash with the server.
  • To bring back a dropped integration, remove its exclude line in bukkit/build.gradle and add the plugin's jar to bukkit/libs/.
  • Full design notes and test results: documentation/plugins/gdhooks-bluemap-claims.md (ops repo).

Building

The build compiles against two jars in bukkit/libs/ that are not in git: GriefDefender griefdefender-bukkit-3.1.9.jar (its 3.x API is on no Maven repo) and BlueMap bluemap-5.7-neoforge.jar. Copy them in first. The fetch-libs.sh helper that gets them is in the older ops-repo folder Server Plugins Or Mods/Plugins/GDHooks/bukkit/libs/, not in this repo.

JAVA_HOME=$(/usr/libexec/java_home -v 21) ./gradlew :bukkit:loader:shadowJar

Output: bukkit/loader/build/libs/gdhooks-bukkit-0.6-DEV.jar (about 105 KB). A new jar needs a server restart.

Full command, permission and config tables: Reference.