mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-05 17:07:06 +02:00
Add expansion is external + persistent = true check to unregisterAll method loop.
This commit is contained in:
@@ -411,6 +411,14 @@ 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() || expansion.getExpansionType() == Type.INTERNAL) {
|
if (expansion.persist() || expansion.getExpansionType() == Type.INTERNAL) {
|
||||||
|
// Print warning if an external expansion is set to be persistent.
|
||||||
|
if (expansion.getExpansionType() == Type.EXTERNAL && expansion.persist()) {
|
||||||
|
Msg.warn("Nag author(s) %s about their expansion %s being marked as \"external\" "
|
||||||
|
+ "but having persist() set to true!", expansion.getAuthor(), expansion.getIdentifier());
|
||||||
|
Msg.warn("External Expansions should not be set to be persistent! PlaceholderAPI "
|
||||||
|
+ "will respect this setting and skip the unregister of this Expansion...");
|
||||||
|
}
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user