From 7a9b3442d275d9e8c29f95f8b6e7f18edfd6a417 Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Tue, 3 Nov 2020 16:43:18 +0100 Subject: [PATCH 1/6] 1.16.4 --- Bukkit/build.gradle.kts | 4 ++-- Core/build.gradle.kts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Bukkit/build.gradle.kts b/Bukkit/build.gradle.kts index d69c5c113..426aae046 100644 --- a/Bukkit/build.gradle.kts +++ b/Bukkit/build.gradle.kts @@ -43,11 +43,11 @@ dependencies { implementation("org.bstats:bstats-bukkit:1.7") // Minecraft - compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.3-R0.1-SNAPSHOT") + compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.4-R0.1-SNAPSHOT") implementation("io.papermc:paperlib:1.0.5") // Plugins - compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.0-SNAPSHOT") { + compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.0") { exclude(group = "org.bukkit") exclude(group = "org.spigotmc") } diff --git a/Core/build.gradle.kts b/Core/build.gradle.kts index aee1b3d4f..99e3d0a22 100644 --- a/Core/build.gradle.kts +++ b/Core/build.gradle.kts @@ -26,12 +26,12 @@ dependencies { compileOnlyApi("javax.inject:javax.inject:1") // Plugins - compileOnlyApi("com.sk89q.worldedit:worldedit-core:7.2.0-SNAPSHOT") { + compileOnlyApi("com.sk89q.worldedit:worldedit-core:7.2.0") { exclude(group = "bukkit-classloader-check") exclude(group = "mockito-core") exclude(group = "dummypermscompat") } - testImplementation("com.sk89q.worldedit:worldedit-core:7.2.0-SNAPSHOT") + testImplementation("com.sk89q.worldedit:worldedit-core:7.2.0") // Logging api("org.slf4j:slf4j-api:1.7.25") From f7dd8af35e573967413b248ce25f1b2b77dbc78a Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sun, 1 Nov 2020 23:05:41 +0100 Subject: [PATCH 2/6] Enhance plot claim message --- .../src/main/java/com/plotsquared/core/command/Auto.java | 9 ++++++--- Core/src/main/java/com/plotsquared/core/command/Buy.java | 3 ++- .../main/java/com/plotsquared/core/command/Claim.java | 6 ++++-- Core/src/main/resources/lang/messages_en.json | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Auto.java b/Core/src/main/java/com/plotsquared/core/command/Auto.java index 6cdbdf627..234499e9f 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Auto.java +++ b/Core/src/main/java/com/plotsquared/core/command/Auto.java @@ -108,10 +108,12 @@ public class Auto extends SubCommand { if (metaDataAccess.isPresent()) { int grantedPlots = metaDataAccess.get().orElse(0); if (diff < 0 && grantedPlots < sizeX * sizeZ) { - player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots")); + player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), + Template.of("amount", String.valueOf(diff + grantedPlots))); return false; } else if (diff >= 0 && grantedPlots + diff < sizeX * sizeZ) { - player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots")); + player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), + Template.of("amount", String.valueOf(diff + grantedPlots))); return false; } else { int left = grantedPlots + diff < 0 ? 0 : diff - sizeX * sizeZ; @@ -125,7 +127,8 @@ public class Auto extends SubCommand { Template.of("remainingGrants", String.valueOf(left))); } } else { - player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots")); + player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), + Template.of("amount", "0")); return false; } } diff --git a/Core/src/main/java/com/plotsquared/core/command/Buy.java b/Core/src/main/java/com/plotsquared/core/command/Buy.java index a4326112a..c7074abc5 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Buy.java +++ b/Core/src/main/java/com/plotsquared/core/command/Buy.java @@ -87,7 +87,8 @@ public class Buy extends Command { checkTrue(!plot.isOwner(player.getUUID()), TranslatableCaption.of("economy.cannot_buy_own")); Set plots = plot.getConnectedPlots(); checkTrue(player.getPlotCount() + plots.size() <= player.getAllowedPlots(), - TranslatableCaption.of("permission.cant_claim_more_plots")); + TranslatableCaption.of("permission.cant_claim_more_plots"), + Template.of("amount", String.valueOf(player.getAllowedPlots()))); double price = plot.getFlag(PriceFlag.class); if (price <= 0) { throw new CommandException(TranslatableCaption.of("economy.not_for_sale")); diff --git a/Core/src/main/java/com/plotsquared/core/command/Claim.java b/Core/src/main/java/com/plotsquared/core/command/Claim.java index 92646e6e2..8e0ad7815 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Claim.java +++ b/Core/src/main/java/com/plotsquared/core/command/Claim.java @@ -104,10 +104,12 @@ public class Claim extends SubCommand { grants = metaDataAccess.get().orElse(0); if (grants <= 0) { metaDataAccess.remove(); - player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots")); + player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), + Template.of("amount", String.valueOf(grants))); } } else { - player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots")); + player.sendMessage(TranslatableCaption.of("permission.cant_claim_more_plots"), + Template.of("amount", String.valueOf(grants))); } } diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index d2035e6aa..e0b03fb9e 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -208,7 +208,7 @@ "permission.no_permission": "You are lacking the permission node: .", "permission.no_permission_event": "You are lacking the permission node: .", "permission.no_plot_perms": "You must be the plot owner to perform this action.", - "permission.cant_claim_more_plots": "You can't claim more plots.", + "permission.cant_claim_more_plots": "You can't claim more than plots.", "permission.cant_claim_more_clusters": "You can't claim more clusters.", "permission.cant_transfer_more_plots": "You can't send more plots to that user.", "permission.cant_claim_more_plots_num": "You can't claim more than plots at once.", From 5b11175cf3ee17d6db29db6486ebdf098e84d392 Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sun, 1 Nov 2020 22:16:23 +0100 Subject: [PATCH 3/6] Add plots.visit.denied permission --- Bukkit/src/main/resources/plugin.yml | 2 ++ Core/src/main/java/com/plotsquared/core/command/Visit.java | 7 +++++++ .../java/com/plotsquared/core/permissions/Permission.java | 1 + 3 files changed, 10 insertions(+) diff --git a/Bukkit/src/main/resources/plugin.yml b/Bukkit/src/main/resources/plugin.yml index 91579acdb..bd5328e27 100644 --- a/Bukkit/src/main/resources/plugin.yml +++ b/Bukkit/src/main/resources/plugin.yml @@ -141,6 +141,8 @@ permissions: default: false plots.visit.other: default: false + plots.visit.denied: + default: false plots.home: default: false plots.alias.remove: diff --git a/Core/src/main/java/com/plotsquared/core/command/Visit.java b/Core/src/main/java/com/plotsquared/core/command/Visit.java index b75182ee0..031cb5fc9 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Visit.java +++ b/Core/src/main/java/com/plotsquared/core/command/Visit.java @@ -135,6 +135,13 @@ public class Visit extends Command { Templates.of("node", "plots.admin.visit.untrusted")); return; } + if (plot.isDenied(player.getUUID())) { + if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_DENIED)) { + player.sendMessage(TranslatableCaption.of("permission.no_permission"), + Template.of("node", "plots.visit.denied")); + return; + } + } } confirm.run(this, () -> plot.teleportPlayer(player, TeleportCause.COMMAND, result -> { diff --git a/Core/src/main/java/com/plotsquared/core/permissions/Permission.java b/Core/src/main/java/com/plotsquared/core/permissions/Permission.java index dc8604c60..cf1d78a75 100644 --- a/Core/src/main/java/com/plotsquared/core/permissions/Permission.java +++ b/Core/src/main/java/com/plotsquared/core/permissions/Permission.java @@ -147,6 +147,7 @@ public enum Permission { PERMISSION_VISIT_UNOWNED("plots.visit.unowned"), PERMISSION_VISIT_OWNED("plots.visit.owned"), PERMISSION_SHARED("plots.visit.shared"), + PERMISSION_VISIT_DENIED("plots.visit.denied"), PERMISSION_VISIT_OTHER("plots.visit.other"), PERMISSION_HOME("plots.home"), PERMISSION_ALIAS_SET("plots.alias.set"), From 092690e9f00ae3543c2468c844de12d692cfe33f Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Mon, 2 Nov 2020 12:17:16 +0100 Subject: [PATCH 4/6] Update permission in regards of https://github.com/IntellectualSites/PlotSquared/pull/2932 --- Core/src/main/java/com/plotsquared/core/command/Visit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Visit.java b/Core/src/main/java/com/plotsquared/core/command/Visit.java index 031cb5fc9..a490ea472 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Visit.java +++ b/Core/src/main/java/com/plotsquared/core/command/Visit.java @@ -138,7 +138,7 @@ public class Visit extends Command { if (plot.isDenied(player.getUUID())) { if (!Permissions.hasPermission(player, Permission.PERMISSION_VISIT_DENIED)) { player.sendMessage(TranslatableCaption.of("permission.no_permission"), - Template.of("node", "plots.visit.denied")); + Template.of("node", String.valueOf(Permission.PERMISSION_VISIT_DENIED))); return; } } From 0ff8abcd6fd1fcb0307b563df81f858765e24c5c Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Sun, 8 Nov 2020 15:22:31 +0100 Subject: [PATCH 5/6] Update town template for schem 2 v2 --- Core/src/main/resources/town.template | Bin 2659 -> 2525 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Core/src/main/resources/town.template b/Core/src/main/resources/town.template index 5210fc4324d4720deb26f8082c7b31a19d944eca..c38034864d23341e19ee86ee86940f47388241b0 100644 GIT binary patch literal 2525 zcmbtW2{aU1A0K2H3S%c*Woc}qM0j?CVHoQ~-^0vcddWT`OR`N_leI)9+e8=%lf>g$ zCzUOG@f=aIM3H6&V|mp3PQLdo=e+a%@4e^Td+z=J?z#8;&hPiPgR>nH0&sD00er7q zvAeaPf8~ zuJg-07*WCrp1ld1$-M8#(HY%k`P04g**x{*QBMk{;GFRC^2J6A5_5Ri8KRT;K~akq zQa}B<&&8+7e=+B|C&H!p)v&HnN^zZB%cO zLcW-a_szu=hfhL-grKr8)-amkvMn@BZVYW)3_Ft;ht`qfFS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&h&lvV`UnGm`-T)Xkg$LhA}rFFy)Y65UtxN zk9+E1it|xQQ)zMynNYusYG(*1-8uGQ>$Ioea(q%g{fC9bzFAj4FE(TO^gBkc_=dDk zSK@+Yo=btDDJ8-cJR7i#JGBAexg@J^ zeEn2NfrtP?>MbtI+K8VZ{U*6b=Hy*DihV-2AFQw@q^Pl4pby?a>O^I zTt`jXudn%~Vu{o;X;50Bo37YhU?A;@c1R(#EIUp>X0}`wy>$5)&?B=dKFW$n)ByNB%+8tPubX18dfb@Kf9QPq#fWsgGor~v1J}=sixEQ;F>uWc0xph9b z7w-)r&l58``zM0=sRT+FWwSKV!dxIUpl^iqFX#{VdcB#onj>4ng&mPnaaEH`%0lW* z2TuA`Vna`w4V<09cxpMV8+k_S3e}s*O}(f-H0$*}#kVmjnJ>X=dz-Tj*@Gw$JF4~I zCqDz;J%#|F7|;JZlV8*C#Q(DFFGG{(w~*UwUw#b&qrX=FV?#hcHyx!-fJHR^dGoKY dO8o7RBZS6 Date: Sun, 8 Nov 2020 21:48:23 +0100 Subject: [PATCH 6/6] Add java 11 to actions test --- .github/workflows/gradle.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 1f19a8e80..fd25c3a0d 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -13,6 +13,9 @@ on: jobs: test: runs-on: ubuntu-18.04 + strategy: + matrix: + java: [1.8, 1.11] steps: - name: Checkout