mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-11-09 20:55:04 +01:00
Compare commits
7 Commits
feature/ad
...
feature/up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3684e32ac0 | ||
|
|
b838d1c52a | ||
|
|
0a712e6530 | ||
|
|
272e2e7904 | ||
|
|
32f3d14682 | ||
|
|
152105017d | ||
|
|
be956f52b0 |
12
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
12
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -18,13 +18,13 @@ body:
|
|||||||
label: Confirmation
|
label: Confirmation
|
||||||
description: Please make sure to have followed the following checks.
|
description: Please make sure to have followed the following checks.
|
||||||
options:
|
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
|
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
|
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
|
required: true
|
||||||
- label: The [Common Issues](https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Common-Issues) page doesn't mention this issue.
|
- label: "The [Common Issues](https://wiki.placeholderapi.com/common-issues/) page doesn't mention this issue."
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
attributes:
|
attributes:
|
||||||
@@ -85,6 +85,8 @@ body:
|
|||||||
description: |-
|
description: |-
|
||||||
Get the latest content of your `latest.log` file an upload it to https://paste.helpch.at
|
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.
|
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"
|
placeholder: "https://paste.helpch.at/latest.log"
|
||||||
- type: input
|
- type: input
|
||||||
id: "error"
|
id: "error"
|
||||||
@@ -99,5 +101,5 @@ body:
|
|||||||
description: |-
|
description: |-
|
||||||
Add any extra info you think is nessesary for this Bug report.
|
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 `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 a Timings or Spark-Report or info about the plugin in question.
|
- If you selected `Plugin/Server Incompatability` should you include extra Server info such as Spark-Report or info about the plugin in question.
|
||||||
placeholder: "Put any extra info you like into this field..."
|
placeholder: "Put any extra info you like into this field..."
|
||||||
|
|||||||
@@ -9,14 +9,14 @@
|
|||||||
[spigot]: https://www.spigotmc.org/resources/6245/
|
[spigot]: https://www.spigotmc.org/resources/6245/
|
||||||
[hangar]: https://hangar.papermc.io/HelpChat/PlaceholderAPI
|
[hangar]: https://hangar.papermc.io/HelpChat/PlaceholderAPI
|
||||||
[bbb]: https://builtbybit.com/resources/placeholderapi.24306
|
[bbb]: https://builtbybit.com/resources/placeholderapi.24306
|
||||||
[Expansions cloud]: https://api.extendedclip.com/home
|
[Expansions cloud]: https://api.placeholderapi.net/home
|
||||||
[placeholder list]: https://helpch.at/placeholders
|
[placeholder list]: https://helpch.at/placeholders
|
||||||
[statistics]: https://bstats.org/plugin/bukkit/PlaceholderAPI
|
[statistics]: https://bstats.org/plugin/bukkit/PlaceholderAPI
|
||||||
|
|
||||||
[ci]: http://ci.extendedclip.com/job/PlaceholderAPI/
|
[ci]: http://ci.extendedclip.com/job/PlaceholderAPI/
|
||||||
[ciImg]: http://ci.extendedclip.com/buildStatus/icon?job=PlaceholderAPI
|
[ciImg]: http://ci.extendedclip.com/buildStatus/icon?job=PlaceholderAPI
|
||||||
|
|
||||||
[APIversionImg]: https://img.shields.io/nexus/placeholderapi/me.clip/placeholderapi?server=https%3A%2F%2Frepo.extendedclip.com&label=API%20Version
|
[APIversionImg]: https://repo.extendedclip.com/api/badge/latest/releases/me/clip/placeholderapi?name=API%20Version
|
||||||
[logo]: https://wiki.placeholderapi.com/assets/img/papi-logo.png
|
[logo]: https://wiki.placeholderapi.com/assets/img/papi-logo.png
|
||||||
|
|
||||||
[contributing]: https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/.github/CONTRIBUTING.md
|
[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.
|
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,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.
|
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.
|
||||||
|
|
||||||
## Contribute
|
## 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.
|
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.
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ public final class PlaceholderAPI {
|
|||||||
* @return String containing all translated placeholders
|
* @return String containing all translated placeholders
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public static List<String> setBracketPlaceholders(final OfflinePlayer player,
|
public static List<@NotNull String> setBracketPlaceholders(final OfflinePlayer player,
|
||||||
@NotNull final List<String> text) {
|
@NotNull final List<@NotNull String> text) {
|
||||||
return text.stream().map(line -> setBracketPlaceholders(player, line))
|
return text.stream().map(line -> setBracketPlaceholders(player, line))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,8 @@ public final class PlaceholderAPI {
|
|||||||
* @param text Text to set the placeholder values in
|
* @param text Text to set the placeholder values in
|
||||||
* @return String containing all translated placeholders
|
* @return String containing all translated placeholders
|
||||||
*/
|
*/
|
||||||
public static String setBracketPlaceholders(Player player, String text) {
|
@NotNull
|
||||||
|
public static String setBracketPlaceholders(Player player, @NotNull String text) {
|
||||||
return setBracketPlaceholders((OfflinePlayer) player, text);
|
return setBracketPlaceholders((OfflinePlayer) player, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +163,8 @@ public final class PlaceholderAPI {
|
|||||||
* @param text List of Strings to set the placeholder values in
|
* @param text List of Strings to set the placeholder values in
|
||||||
* @return String containing all translated placeholders
|
* @return String containing all translated placeholders
|
||||||
*/
|
*/
|
||||||
public static List<String> setBracketPlaceholders(Player player, List<String> text) {
|
@NotNull
|
||||||
|
public static List<String> setBracketPlaceholders(Player player, @NotNull List<String> text) {
|
||||||
return setBracketPlaceholders((OfflinePlayer) player, text);
|
return setBracketPlaceholders((OfflinePlayer) player, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,12 +110,7 @@ public abstract class PlaceholderExpansion extends PlaceholderHook {
|
|||||||
* command is used
|
* command is used
|
||||||
*
|
*
|
||||||
* @return if this expansion should persist through placeholder reloads
|
* @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() {
|
public boolean persist() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ import org.jetbrains.annotations.Unmodifiable;
|
|||||||
public final class CloudExpansionManager {
|
public final class CloudExpansionManager {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static final String API_URL = "http://api.extendedclip.com/v2/";
|
private static final String API_URL = "http://api.placeholderapi.net/v2/";
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private static final Gson GSON = new Gson();
|
private static final Gson GSON = new Gson();
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ import me.clip.placeholderapi.expansion.Cacheable;
|
|||||||
import me.clip.placeholderapi.expansion.Cleanable;
|
import me.clip.placeholderapi.expansion.Cleanable;
|
||||||
import me.clip.placeholderapi.expansion.Configurable;
|
import me.clip.placeholderapi.expansion.Configurable;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion.Type;
|
|
||||||
import me.clip.placeholderapi.expansion.Taskable;
|
import me.clip.placeholderapi.expansion.Taskable;
|
||||||
import me.clip.placeholderapi.expansion.VersionSpecific;
|
import me.clip.placeholderapi.expansion.VersionSpecific;
|
||||||
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
|
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
|
||||||
@@ -265,9 +264,6 @@ public final class LocalExpansionManager implements Listener {
|
|||||||
|
|
||||||
if (expansion instanceof VersionSpecific) {
|
if (expansion instanceof VersionSpecific) {
|
||||||
VersionSpecific nms = (VersionSpecific) expansion;
|
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())) {
|
if (!nms.isCompatibleWith(PlaceholderAPIPlugin.getServerVersion())) {
|
||||||
Msg.warn("Your server version is incompatible with expansion %s %s",
|
Msg.warn("Your server version is incompatible with expansion %s %s",
|
||||||
expansion.getIdentifier(), expansion.getVersion());
|
expansion.getIdentifier(), expansion.getVersion());
|
||||||
@@ -324,15 +320,6 @@ public final class LocalExpansionManager implements Listener {
|
|||||||
|
|
||||||
@ApiStatus.Internal
|
@ApiStatus.Internal
|
||||||
public boolean unregister(@NotNull final PlaceholderExpansion expansion) {
|
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) {
|
if (expansions.remove(expansion.getIdentifier().toLowerCase(Locale.ROOT)) == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -406,6 +393,10 @@ public final class LocalExpansionManager implements Listener {
|
|||||||
|
|
||||||
private void unregisterAll() {
|
private void unregisterAll() {
|
||||||
for (final PlaceholderExpansion expansion : Sets.newHashSet(expansions.values())) {
|
for (final PlaceholderExpansion expansion : Sets.newHashSet(expansions.values())) {
|
||||||
|
if (expansion.persist()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
expansion.unregister();
|
expansion.unregister();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user