Compare commits

..

3 Commits

6 changed files with 31 additions and 21 deletions

View File

@@ -18,13 +18,13 @@ body:
label: Confirmation
description: Please make sure to have followed the following checks.
options:
- label: "My issue isn't already found on the Issue tracker."
- label: My issue isn't already found on the Issue tracker.
required: true
- label: "My issue is about **PlaceholderAPI** and not any expansion or external plugin."
- label: My issue is about **PlaceholderAPI** and not any expansion or external plugin
required: true
- label: "The issue isn't already fixed in a Spigot Release or Development Build."
- label: The issue isn't already fixed in a Spigot Release or Development Build.
required: true
- label: "The [Common Issues](https://wiki.placeholderapi.com/common-issues/) page doesn't mention this issue."
- label: The [Common Issues](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Common-Issues) page doesn't mention this issue.
required: true
- type: dropdown
attributes:
@@ -85,8 +85,6 @@ body:
description: |-
Get the latest content of your `latest.log` file an upload it to https://paste.helpch.at
Take the generated URL and paste it into this field.
**Always provide the full `latest.log` and not just parts of it or just the error (if any)!**
placeholder: "https://paste.helpch.at/latest.log"
- type: input
id: "error"
@@ -101,5 +99,5 @@ body:
description: |-
Add any extra info you think is nessesary for this Bug report.
- If you selected `API Bug` will you need to include code-examples here to reproduce the issue.
- If you selected `Plugin/Server Incompatability` should you include extra Server info such as Spark-Report or info about the plugin in question.
- If you selected `Plugin/Server Incompatability` should you include extra Server info such as a Timings or Spark-Report or info about the plugin in question.
placeholder: "Put any extra info you like into this field..."

View File

@@ -9,14 +9,14 @@
[spigot]: https://www.spigotmc.org/resources/6245/
[hangar]: https://hangar.papermc.io/HelpChat/PlaceholderAPI
[bbb]: https://builtbybit.com/resources/placeholderapi.24306
[Expansions cloud]: https://api.placeholderapi.net/home
[Expansions cloud]: https://api.extendedclip.com/home
[placeholder list]: https://helpch.at/placeholders
[statistics]: https://bstats.org/plugin/bukkit/PlaceholderAPI
[ci]: http://ci.extendedclip.com/job/PlaceholderAPI/
[ciImg]: http://ci.extendedclip.com/buildStatus/icon?job=PlaceholderAPI
[APIversionImg]: https://repo.extendedclip.com/api/badge/latest/releases/me/clip/placeholderapi?name=API%20Version
[APIversionImg]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
[logo]: https://wiki.placeholderapi.com/assets/img/papi-logo.png
[contributing]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md
@@ -32,7 +32,7 @@
Support for specific plugins are provided either by the plugin itself or through expansions. The expansions may be downloaded in-game through the PAPI Expansion Cloud. There are currently over 240+ expansions that support a wide variety of plugins, such as Essentials, Factions, LuckPerms, and Vault.
PlaceholderAPI has been downloaded over 1,700,000 times on Spigot and has been used concurrently on over 45,000 servers, which makes it a must-have for a server of any type or scale.
PlaceholderAPI has been downloaded over 1,600,000 times and has been used concurrently on over 40,000 servers, which makes it a must-have for a server of any type or scale.
## Contribute
If you would like to contribute towards PlaceholderAPI should you take a look at our [Contributing file][contributing] for the ins and outs on how you can do that and what you need to keep in mind.

View File

@@ -136,8 +136,8 @@ public final class PlaceholderAPI {
* @return String containing all translated placeholders
*/
@NotNull
public static List<@NotNull String> setBracketPlaceholders(final OfflinePlayer player,
@NotNull final List<@NotNull String> text) {
public static List<String> setBracketPlaceholders(final OfflinePlayer player,
@NotNull final List<String> text) {
return text.stream().map(line -> setBracketPlaceholders(player, line))
.collect(Collectors.toList());
}
@@ -150,8 +150,7 @@ public final class PlaceholderAPI {
* @param text Text to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static String setBracketPlaceholders(Player player, @NotNull String text) {
public static String setBracketPlaceholders(Player player, String text) {
return setBracketPlaceholders((OfflinePlayer) player, text);
}
@@ -163,8 +162,7 @@ public final class PlaceholderAPI {
* @param text List of Strings to set the placeholder values in
* @return String containing all translated placeholders
*/
@NotNull
public static List<String> setBracketPlaceholders(Player player, @NotNull List<String> text) {
public static List<String> setBracketPlaceholders(Player player, List<String> text) {
return setBracketPlaceholders((OfflinePlayer) player, text);
}

View File

@@ -110,7 +110,12 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
* command is used
*
* @return if this expansion should persist through placeholder reloads
*
* @deprecated PlaceholderExpansions registered through their {@link #register()} and not through
* {@link me.clip.placeholderapi.expansion.manager.LocalExpansionManager#register(Class)}
* will be considered internal now and not be unregistered during Plugin reloads.
*/
@Deprecated
public boolean persist() {
return false;
}

View File

@@ -60,7 +60,7 @@ import org.jetbrains.annotations.Unmodifiable;
public final class CloudExpansionManager {
@NotNull
private static final String API_URL = "http://api.placeholderapi.net/v2/";
private static final String API_URL = "http://api.extendedclip.com/v2/";
@NotNull
private static final Gson GSON = new Gson();

View File

@@ -46,6 +46,7 @@ import me.clip.placeholderapi.expansion.Cacheable;
import me.clip.placeholderapi.expansion.Cleanable;
import me.clip.placeholderapi.expansion.Configurable;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import me.clip.placeholderapi.expansion.PlaceholderExpansion.Type;
import me.clip.placeholderapi.expansion.Taskable;
import me.clip.placeholderapi.expansion.VersionSpecific;
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
@@ -264,6 +265,9 @@ public final class LocalExpansionManager implements Listener {
if (expansion instanceof VersionSpecific) {
VersionSpecific nms = (VersionSpecific) expansion;
Msg.warn("Nag Author(s) %s of expansion %s about their usage of the deprecated "
+ "VersionSpecific interface!", expansion.getAuthor(), expansion.getIdentifier());
Msg.warn("They should switch to a new method of determining the Server version.");
if (!nms.isCompatibleWith(PlaceholderAPIPlugin.getServerVersion())) {
Msg.warn("Your server version is incompatible with expansion %s %s",
expansion.getIdentifier(), expansion.getVersion());
@@ -320,6 +324,15 @@ public final class LocalExpansionManager implements Listener {
@ApiStatus.Internal
public boolean unregister(@NotNull final PlaceholderExpansion expansion) {
if (expansion.getExpansionType() == Type.INTERNAL || expansion.persist()) {
if (expansion.getExpansionType() == Type.EXTERNAL && expansion.persist()) {
Msg.warn("Nag Author(s) %s about their external expansion %s having persist set to true",
expansion.getAuthor(), expansion.getIdentifier());
}
return true;
}
if (expansions.remove(expansion.getIdentifier().toLowerCase(Locale.ROOT)) == null) {
return false;
}
@@ -393,10 +406,6 @@ public final class LocalExpansionManager implements Listener {
private void unregisterAll() {
for (final PlaceholderExpansion expansion : Sets.newHashSet(expansions.values())) {
if (expansion.persist()) {
continue;
}
expansion.unregister();
}
}