From 6c5cd0ed1fdca1c0a4566ef445dab581169fe57f Mon Sep 17 00:00:00 2001 From: Leomixer17 Date: Sat, 13 Jul 2019 00:33:35 +0200 Subject: [PATCH 1/7] Update plugin.yml (#142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.13 set as api version won’t cause issues. I reverted adding 1.14 but we can merge this as it won’t have any conflicts. Thanks for the contribution. --- src/main/resources/plugin.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 37f5330..3394896 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,7 @@ name: ${project.name} main: me.clip.placeholderapi.PlaceholderAPIPlugin version: ${project.version} +api-version: 1.13 authors: [extended_clip, Glare] description: ${project.description} permissions: From 024d9b281a9d90cc6b68aac98f78b2ab12ee1867 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Tue, 23 Jul 2019 17:19:20 +0200 Subject: [PATCH 2/7] Fixing broken link --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 35cfabd..1ed1773 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,7 +8,7 @@ about: Report bugs of PlaceholderAPI with this template [Request change (PlaceholderAPI)]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=change_request_placeholderapi.md [Spigot]: https://www.spigotmc.org/resources/6245/ [Jenkins]: http://ci.extendedclip.com/job/PlaceholderAPI/ -[issue]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues +[issues]: https://github.com/PlaceholderAPI/PlaceholderAPI/issues ## Please read This template is only for reporting bugs of PlaceholderAPI! From 6b9f22c7ecb903d8dc6b2e93d70441e55fd1d871 Mon Sep 17 00:00:00 2001 From: Evan Lindsay Date: Sun, 4 Aug 2019 15:03:25 -0700 Subject: [PATCH 3/7] Fix case check in PlaceholderExpansion.isRegistered (#161) --- .../me/clip/placeholderapi/expansion/PlaceholderExpansion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java index 64b608d..9c6ad16 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java +++ b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java @@ -98,7 +98,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { */ public boolean isRegistered() { Validate.notNull(getIdentifier(), "Placeholder identifier can not be null!"); - return PlaceholderAPI.getRegisteredIdentifiers().contains(getIdentifier()); + return PlaceholderAPI.isRegistered(getIdentifier()); } /** From 9871efbadb6c0b00e971e38e80d492091e8c7305 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Thu, 19 Sep 2019 14:16:35 -0400 Subject: [PATCH 4/7] Allow cancelling expansion registration --- .../events/ExpansionRegisterEvent.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java b/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java index 664475a..9bdff16 100644 --- a/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java +++ b/src/main/java/me/clip/placeholderapi/events/ExpansionRegisterEvent.java @@ -21,13 +21,15 @@ package me.clip.placeholderapi.events; import me.clip.placeholderapi.expansion.PlaceholderExpansion; +import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -public class ExpansionRegisterEvent extends Event { +public class ExpansionRegisterEvent extends Event implements Cancellable { private static final HandlerList HANDLERS = new HandlerList(); private PlaceholderExpansion expansion; + private boolean isCancelled; public ExpansionRegisterEvent(PlaceholderExpansion expansion) { this.expansion = expansion; @@ -45,4 +47,14 @@ public class ExpansionRegisterEvent extends Event { public PlaceholderExpansion getExpansion() { return expansion; } + + @Override + public boolean isCancelled() { + return isCancelled; + } + + @Override + public void setCancelled(boolean b) { + this.isCancelled = b; + } } From 51599c404478c18452720c5c6dab3b425ee63b12 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Thu, 19 Sep 2019 14:22:08 -0400 Subject: [PATCH 5/7] Allow cancelling expansion registration --- src/main/java/me/clip/placeholderapi/PlaceholderAPI.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java index e5e1974..86a6cfd 100644 --- a/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java +++ b/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java @@ -323,11 +323,12 @@ public class PlaceholderAPI { } public static boolean registerExpansion(PlaceholderExpansion ex) { - if (registerPlaceholderHook(ex.getIdentifier(), ex)) { - Bukkit.getPluginManager().callEvent(new ExpansionRegisterEvent(ex)); - return true; + ExpansionRegisterEvent ev = new ExpansionRegisterEvent(ex); + Bukkit.getPluginManager().callEvent(ev); + if (ev.isCancelled()) { + return false; } - return false; + return registerPlaceholderHook(ex.getIdentifier(), ex); } public static boolean unregisterExpansion(PlaceholderExpansion ex) { From a1a1b1afd74a96950d22420f788e8bdb4bd20fa1 Mon Sep 17 00:00:00 2001 From: extendedclip Date: Thu, 19 Sep 2019 14:26:35 -0400 Subject: [PATCH 6/7] Bump version to 2.10.4 for release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 89b4660..3252ac3 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.clip placeholderapi - 2.10.3-DEV-${BUILD_NUMBER} + 2.10.4 PlaceholderAPI An awesome placeholder provider! http://extendedclip.com From 38c1eca59004ba26247d112dd3c7ca623093c1bb Mon Sep 17 00:00:00 2001 From: extendedclip Date: Thu, 19 Sep 2019 14:38:33 -0400 Subject: [PATCH 7/7] Bump version to 2.10.5 development --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3252ac3..bb3fe40 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ me.clip placeholderapi - 2.10.4 + 2.10.5-DEV-${BUILD_NUMBER} PlaceholderAPI An awesome placeholder provider! http://extendedclip.com