mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-06 05:17:05 +02:00
Compare commits
6 Commits
feat/1.21
...
feature/ad
Author | SHA1 | Date | |
---|---|---|---|
|
0ba5e5dd89 | ||
|
9689eec3ab | ||
|
19fca16653 | ||
|
98082398fc | ||
|
c66806ecf8 | ||
|
c97f5aa5a6 |
@@ -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,000,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,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
|
## 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.
|
||||||
|
@@ -71,6 +71,7 @@ tasks {
|
|||||||
|
|
||||||
withType<JavaCompile> {
|
withType<JavaCompile> {
|
||||||
options.encoding = "UTF-8"
|
options.encoding = "UTF-8"
|
||||||
|
options.release = 8
|
||||||
}
|
}
|
||||||
|
|
||||||
withType<Javadoc> {
|
withType<Javadoc> {
|
||||||
|
@@ -110,7 +110,12 @@ 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;
|
||||||
}
|
}
|
||||||
|
@@ -46,6 +46,7 @@ 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;
|
||||||
@@ -264,6 +265,9 @@ 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());
|
||||||
@@ -320,6 +324,15 @@ 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;
|
||||||
}
|
}
|
||||||
@@ -393,10 +406,6 @@ 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