diff --git a/README.md b/README.md index 5d187c0..9e3d14c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![ClaimChunk Logo](imgs/icon64.png) ![ClaimChunk Title](imgs/logo_carrier.png) -[![Plugin Version](https://img.shields.io/static/v1?label=Version&message=0.0.25-FIX1&color=blueviolet&style=for-the-badge)](https://github.com/cjburkey01/ClaimChunk/releases) +[![Plugin Version](https://img.shields.io/static/v1?label=Version&message=0.0.25-FIX2&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/) ![Java Version](https://img.shields.io/static/v1?label=Java&message=17&color=blueviolet&style=for-the-badge) @@ -85,26 +85,26 @@ Maven: com.cjburkey.claimchunk claimchunk - 0.0.25-FIX1 + 0.0.25-FIX2 ``` Gradle (Groovy): ```groovy -implementation 'com.cjburkey.claimchunk:claimchunk:0.0.25-FIX1' +implementation 'com.cjburkey.claimchunk:claimchunk:0.0.25-FIX2' ``` Gradle (Kotlin): ```kotlin -implementation("com.cjburkey.claimchunk:claimchunk:0.0.25-FIX1") +implementation("com.cjburkey.claimchunk:claimchunk:0.0.25-FIX2") ``` 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-FIX1&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-FIX2&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: diff --git a/build.gradle.kts b/build.gradle.kts index 28e7243..9e7ae35 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -16,8 +16,8 @@ plugins { object DepData { const val JAVA_VERSION = 17 - const val LIVE_VERSION = "0.0.25-FIX1" - const val THIS_VERSION = "0.0.25-FIX1" + const val LIVE_VERSION = "0.0.25-FIX2" + const val THIS_VERSION = "0.0.25-FIX2" const val PLUGIN_NAME = "ClaimChunk" const val ARCHIVES_BASE_NAME = "claimchunk" const val MAIN_CLASS = "com.cjburkey.claimchunk.ClaimChunk" diff --git a/changelogs/0.0.25-FIX1.md b/changelogs/0.0.25-FIX1.md new file mode 100644 index 0000000..cfcbbcd --- /dev/null +++ b/changelogs/0.0.25-FIX1.md @@ -0,0 +1,4 @@ +# ClaimChunk 0.0.25-FIX1 + +Fixes: +* Crash on first launch! Kinda a problem :) diff --git a/changelogs/0.0.25-FIX2.md b/changelogs/0.0.25-FIX2.md new file mode 100644 index 0000000..08c9a56 --- /dev/null +++ b/changelogs/0.0.25-FIX2.md @@ -0,0 +1,8 @@ +# ClaimChunk 0.0.25-FIX1 + +Fixes: +* Re-add the `claimchunk_am_trusted` placeholder + * The placeholder works the same way, returning that the player is trusted if + said player has *any* permissions granted by the owner for the chunk they're + standing in (the chunk must be owned; the placeholder shows not trusted in + unclaimed chunks to match pre-0.0.24 behavior). diff --git a/src/main/java/com/cjburkey/claimchunk/placeholder/ClaimChunkPlaceholders.java b/src/main/java/com/cjburkey/claimchunk/placeholder/ClaimChunkPlaceholders.java index 346edd4..280508b 100644 --- a/src/main/java/com/cjburkey/claimchunk/placeholder/ClaimChunkPlaceholders.java +++ b/src/main/java/com/cjburkey/claimchunk/placeholder/ClaimChunkPlaceholders.java @@ -1,6 +1,7 @@ package com.cjburkey.claimchunk.placeholder; import com.cjburkey.claimchunk.api.IClaimChunkPlugin; +import com.cjburkey.claimchunk.chunk.ChunkPos; import me.clip.placeholderapi.PlaceholderAPI; import me.clip.placeholderapi.expansion.PlaceholderExpansion; @@ -64,6 +65,17 @@ public ClaimChunkPlaceholders(IClaimChunkPlugin claimChunk) { /* Online player with chunk owner UUID placeholders */ + // Whether this player has ANY permissions in the chunk they're inside + playerOwnerPlaceholders.put( + "am_trusted", + (ply, ignoredOwner) -> { + ChunkPos pos = new ChunkPos(ply.getLocation().getChunk()); + Map permissions = + claimChunk.getPlayerHandler().getPermissions(pos, ply.getUniqueId()); + return permissions == null + || permissions.values().stream().anyMatch(Boolean::booleanValue); + }); + // Get the username of the owner for this chunk playerOwnerPlaceholders.put( "current_owner",