mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-09-06 05:17:05 +02:00
Compare commits
24 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2d946646f0 | ||
|
5ab61e0cd3 | ||
|
81ef464dad | ||
|
0ae0ddc9cb | ||
|
3d00d48106 | ||
|
7e902cae66 | ||
|
f4e4433b16 | ||
|
d5c371004c | ||
|
e246473782 | ||
|
4afad7f7b0 | ||
|
a0b177bdd8 | ||
|
40b1fe8d68 | ||
|
9ee4afa1e9 | ||
|
1cf66b130c | ||
|
c3cfc82eb3 | ||
|
3afb634e58 | ||
|
d888d9754b | ||
|
4c228ca4fb | ||
|
6cf987586e | ||
|
46d9a69534 | ||
|
af8cc09fca | ||
|
452c8ccd42 | ||
|
054c780fd1 | ||
|
83261eee49 |
18
.github/label-commenter-config.yml
vendored
18
.github/label-commenter-config.yml
vendored
@@ -36,9 +36,9 @@ labels:
|
||||
Your issue unfortunately lacks certain information that we require in order to help you with your issue.
|
||||
Please make sure you provide the following information:
|
||||
|
||||
- Currently used Versions of your server and PlaceholderAPI
|
||||
- Currently installed Expansions
|
||||
- Currently installed Plugins
|
||||
- Currently used Versions of your server (`/version`) and PlaceholderAPI (`/version PlaceholderAPI`)
|
||||
- Currently installed Expansions (`/papi list`)
|
||||
- Currently installed Plugins (`/pl`)
|
||||
- Any additional information requested by users in this issue.
|
||||
|
||||
The easiest way to provide those information is through the `/papi dump` command which posts the required information to https://paste.helpch.at and gives a URL to share.
|
||||
@@ -52,18 +52,18 @@ labels:
|
||||
issue:
|
||||
body: |-
|
||||
Your issue has beeen marked as invalid.
|
||||
This means that it either doesn't follow any provided template, or isn't related to PlaceholderAPI in any way.
|
||||
This means that it either doesn't follow any provided template, or isn't related to PlaceholderAPI.
|
||||
|
||||
Please make sure to use one of the issue templates and provide the requested information.
|
||||
Currently available Templates are:
|
||||
|
||||
- [Bug Report](https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=bug_report.md)
|
||||
- [Feature Request](https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?template=feature_request.md)
|
||||
- [Bug Report](https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?labels=Type%3A+Issue+%28Unconfirmed%29&template=bug_report.yml)
|
||||
- [Feature Request](https://github.com/PlaceholderAPI/PlaceholderAPI/issues/new?labels=Type%3A+Enhancement&template=feature_request.yml)
|
||||
|
||||
If you want changes to be made towards the Wiki, would we encourage you to [Make a Pull request](https://github.com/PlaceholderAPI/PlaceholderAPI/pulls).
|
||||
You can find more information about this process on the [Wiki's Readme](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/wiki/README.md).
|
||||
You can find more information about this process on the [Wiki's Readme](https://github.com/PlaceholderAPI/PlaceholderAPI/blob/wiki/README.md).
|
||||
|
||||
It is recommended to [join our Discord Server](https://helpch.at/discord) as you often receive faster response compared to the issue tracker here.
|
||||
It is recommended to [join our Discord Server](https://helpch.at/discord) as you often receive a faster response compared to the issue tracker here.
|
||||
Questions about PlaceholderAPI should be asked in our [Discussions](https://github.com/PlaceholderAPI/PlaceholderAPI/discussions).
|
||||
action: close
|
||||
pr:
|
||||
@@ -74,7 +74,7 @@ labels:
|
||||
Here is a small summary of what you should know:
|
||||
|
||||
- Pull requests for PlaceholderAPI should target the `master` branch.
|
||||
- Pull requests for the Wiki should target the `docs/wiki` branch.
|
||||
- Pull requests for the Wiki should target the `wiki` branch.
|
||||
|
||||
Don't hesitate to ask us any questions.
|
||||
action: close
|
||||
|
131
build.gradle
131
build.gradle
@@ -1,131 +0,0 @@
|
||||
import org.apache.tools.ant.filters.ReplaceTokens
|
||||
|
||||
plugins {
|
||||
id "java"
|
||||
id "maven-publish"
|
||||
id "org.cadixdev.licenser" version "0.6.1"
|
||||
id "com.github.johnrengelman.shadow" version "7.1.0"
|
||||
}
|
||||
|
||||
group "me.clip"
|
||||
version "2.11.2"
|
||||
|
||||
description "An awesome placeholder provider!"
|
||||
|
||||
repositories {
|
||||
maven({ url = "https://oss.sonatype.org/content/repositories/snapshots/" })
|
||||
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
|
||||
maven({ url = "https://repo.codemc.org/repository/maven-public/" })
|
||||
maven({ url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" })
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.bstats:bstats-bukkit:3.0.0"
|
||||
implementation "net.kyori:adventure-platform-bukkit:4.0.1"
|
||||
|
||||
compileOnly "org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT"
|
||||
compileOnly "org.jetbrains:annotations:23.0.0"
|
||||
|
||||
testImplementation "org.openjdk.jmh:jmh-core:1.32"
|
||||
testImplementation "org.openjdk.jmh:jmh-generator-annprocess:1.32"
|
||||
|
||||
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.8.2"
|
||||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.8.1"
|
||||
}
|
||||
|
||||
processResources {
|
||||
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
failOnError false
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.addStringOption('encoding', 'UTF-8')
|
||||
options.addStringOption('charSet', 'UTF-8')
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
archiveClassifier.set("")
|
||||
|
||||
relocate "org.bstats", "me.clip.placeholderapi.metrics"
|
||||
relocate "net.kyori", "me.clip.placeholderapi.libs.kyori"
|
||||
}
|
||||
|
||||
license {
|
||||
include '**/*.java'
|
||||
|
||||
matching('**/*.java') {
|
||||
header = file('config/headers/main.txt')
|
||||
}
|
||||
|
||||
ext {
|
||||
year = 2021
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
configurations {
|
||||
testImplementation {
|
||||
extendsFrom(compileOnly)
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
if (version.contains("-DEV")) {
|
||||
url = uri("https://repo.extendedclip.com/content/repositories/dev/")
|
||||
} else {
|
||||
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||
}
|
||||
|
||||
credentials {
|
||||
username = System.getenv("JENKINS_USER")
|
||||
password = System.getenv("JENKINS_PASS")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
artifactId = "placeholderapi"
|
||||
|
||||
from components.java
|
||||
|
||||
pom.withXml {
|
||||
|
||||
// some are having issues with bstats so we might need to add that to the pom as well
|
||||
|
||||
asNode().appendNode("packaging", "jar")
|
||||
asNode().remove(asNode().get("dependencies"))
|
||||
|
||||
def dependenciesNode = asNode().appendNode("dependencies")
|
||||
// jetbrains annotations
|
||||
def jetbrainsAnnotations = dependenciesNode.appendNode("dependency")
|
||||
jetbrainsAnnotations.appendNode("groupId", "org.jetbrains")
|
||||
jetbrainsAnnotations.appendNode("artifactId", "annotations")
|
||||
jetbrainsAnnotations.appendNode("version", "19.0.0")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publish.dependsOn clean, test, jar
|
128
build.gradle.kts
Normal file
128
build.gradle.kts
Normal file
@@ -0,0 +1,128 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
|
||||
plugins {
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
id("com.github.hierynomus.license") version "0.16.1"
|
||||
id("com.github.johnrengelman.shadow") version "8.1.0"
|
||||
}
|
||||
|
||||
group = "me.clip"
|
||||
version = "2.11.3"
|
||||
|
||||
description = "An awesome placeholder provider!"
|
||||
|
||||
repositories {
|
||||
maven("https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
|
||||
maven("https://repo.codemc.org/repository/maven-public/")
|
||||
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.bstats:bstats-bukkit:3.0.1")
|
||||
implementation("net.kyori:adventure-platform-bukkit:4.3.0")
|
||||
|
||||
compileOnly("org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT")
|
||||
compileOnlyApi("org.jetbrains:annotations:23.0.0")
|
||||
|
||||
testImplementation("org.openjdk.jmh:jmh-core:1.32")
|
||||
testImplementation("org.openjdk.jmh:jmh-generator-annprocess:1.32")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.8.2")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1")
|
||||
}
|
||||
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
license {
|
||||
header = rootProject.file("config/headers/main.txt")
|
||||
|
||||
include("**/*.java")
|
||||
mapping("java", "JAVADOC_STYLE")
|
||||
|
||||
encoding = "UTF-8"
|
||||
|
||||
ext {
|
||||
set("year", 2021)
|
||||
}
|
||||
}
|
||||
|
||||
val javaComponent: SoftwareComponent = components["java"]
|
||||
|
||||
tasks {
|
||||
processResources {
|
||||
eachFile { expand("version" to project.version) }
|
||||
}
|
||||
|
||||
build {
|
||||
dependsOn(named("shadowJar"))
|
||||
}
|
||||
|
||||
withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
withType<Javadoc> {
|
||||
isFailOnError = false
|
||||
|
||||
with(options as StandardJavadocDocletOptions) {
|
||||
addStringOption("Xdoclint:none", "-quiet")
|
||||
addStringOption("encoding", "UTF-8")
|
||||
addStringOption("charSet", "UTF-8")
|
||||
}
|
||||
}
|
||||
|
||||
withType<ShadowJar> {
|
||||
archiveClassifier.set("")
|
||||
|
||||
relocate("org.bstats", "me.clip.placeholderapi.metrics")
|
||||
relocate("net.kyori", "me.clip.placeholderapi.libs.kyori")
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
artifactId = "placeholderapi"
|
||||
from(javaComponent)
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
if ("-DEV" in version.toString()) {
|
||||
url = uri("https://repo.extendedclip.com/content/repositories/dev/")
|
||||
} else {
|
||||
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||
}
|
||||
|
||||
credentials {
|
||||
username = System.getenv("JENKINS_USER")
|
||||
password = System.getenv("JENKINS_PASS")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
publish.get().setDependsOn(listOf(build.get()))
|
||||
}
|
||||
|
||||
configurations {
|
||||
testImplementation {
|
||||
extendsFrom(compileOnly.get())
|
||||
}
|
||||
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@@ -1 +0,0 @@
|
||||
rootProject.name = 'PlaceholderAPI'
|
1
settings.gradle.kts
Normal file
1
settings.gradle.kts
Normal file
@@ -0,0 +1 @@
|
||||
rootProject.name = "PlaceholderAPI"
|
@@ -22,11 +22,6 @@ package me.clip.placeholderapi.commands.impl.cloud;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.commands.PlaceholderCommand;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
@@ -34,12 +29,17 @@ import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public final class CommandECloud extends PlaceholderCommand {
|
||||
|
||||
@Unmodifiable
|
||||
private static final List<PlaceholderCommand> COMMANDS = ImmutableList
|
||||
.of(new CommandECloudClear(),
|
||||
new CommandECloudToggle(),
|
||||
new CommandECloudStatus(),
|
||||
new CommandECloudUpdate(),
|
||||
new CommandECloudRefresh(),
|
||||
@@ -79,8 +79,6 @@ public final class CommandECloud extends PlaceholderCommand {
|
||||
Msg.msg(sender,
|
||||
"&b&lPlaceholderAPI &8- &7eCloud Help Menu &8- ",
|
||||
" ",
|
||||
"&b/papi &fenable/disable/toggle",
|
||||
" &7&oEnable or disable the eCloud",
|
||||
"&b/papi &fecloud status",
|
||||
" &7&oView status of the eCloud",
|
||||
"&b/papi &fecloud list <all/{author}/installed> {page}",
|
||||
@@ -115,10 +113,8 @@ public final class CommandECloud extends PlaceholderCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(target instanceof CommandECloudToggle) && !plugin.getPlaceholderAPIConfig()
|
||||
.isCloudEnabled()) {
|
||||
Msg.msg(sender,
|
||||
"&cThe eCloud Manager is not enabled!");
|
||||
if (!plugin.getPlaceholderAPIConfig().isCloudEnabled()) {
|
||||
Msg.msg(sender, "&cThe eCloud Manager is not enabled! To enable it, set 'cloud_enabled' to true and reload the plugin.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ public final class CommandECloudStatus extends PlaceholderCommand {
|
||||
|
||||
if (updateCount > 0) {
|
||||
builder.append("&eYou have &f").append(updateCount)
|
||||
.append(updateCount > 1 ? "&e expansions" : "&e expansion").append("installed that ")
|
||||
.append(updateCount > 1 ? "&e expansions" : "&e expansion").append(" installed that ")
|
||||
.append(updateCount > 1 ? "have an" : "has an").append(" update available.");
|
||||
}
|
||||
|
||||
|
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* This file is part of PlaceholderAPI
|
||||
*
|
||||
* PlaceholderAPI
|
||||
* Copyright (c) 2015 - 2021 PlaceholderAPI Team
|
||||
*
|
||||
* PlaceholderAPI free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* PlaceholderAPI is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package me.clip.placeholderapi.commands.impl.cloud;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.commands.PlaceholderCommand;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
|
||||
public final class CommandECloudToggle extends PlaceholderCommand {
|
||||
|
||||
public CommandECloudToggle() {
|
||||
super("toggle", "enable", "disable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void evaluate(@NotNull final PlaceholderAPIPlugin plugin,
|
||||
@NotNull final CommandSender sender, @NotNull final String alias,
|
||||
@NotNull @Unmodifiable final List<String> params) {
|
||||
final boolean desiredState;
|
||||
final boolean currentState = plugin.getPlaceholderAPIConfig().isCloudEnabled();
|
||||
|
||||
switch (alias.toLowerCase(Locale.ROOT)) {
|
||||
case "enable":
|
||||
desiredState = true;
|
||||
break;
|
||||
case "disable":
|
||||
desiredState = false;
|
||||
break;
|
||||
default:
|
||||
desiredState = !currentState;
|
||||
break;
|
||||
}
|
||||
|
||||
if (desiredState == currentState) {
|
||||
Msg.msg(sender, "&7The eCloud Manager is already " + (desiredState ? "enabled" : "disabled"));
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.getPlaceholderAPIConfig().setCloudEnabled(desiredState);
|
||||
|
||||
if (desiredState) {
|
||||
plugin.getCloudExpansionManager().load();
|
||||
} else {
|
||||
plugin.getCloudExpansionManager().kill();
|
||||
}
|
||||
|
||||
Msg.msg(sender, "&aThe eCloud Manager has been " + (desiredState ? "enabled" : "disabled"));
|
||||
}
|
||||
|
||||
}
|
@@ -30,7 +30,6 @@ import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.commands.PlaceholderCommand;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -123,13 +122,9 @@ public final class CommandParse extends PlaceholderCommand {
|
||||
}
|
||||
|
||||
if (broadcast) {
|
||||
Msg.broadcast(message);
|
||||
Bukkit.broadcastMessage(message);
|
||||
} else {
|
||||
if (!(sender instanceof Player)) {
|
||||
Msg.msg(sender, message);
|
||||
} else {
|
||||
((Player) sender).spigot().sendMessage(TextComponent.fromLegacyText(message));
|
||||
}
|
||||
sender.sendMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +151,8 @@ public final class CommandParse extends PlaceholderCommand {
|
||||
final String message = PlaceholderAPI
|
||||
.setRelationalPlaceholders(((Player) targetOne), ((Player) targetTwo),
|
||||
String.join(" ", params.subList(2, params.size())));
|
||||
Msg.msg(sender, message);
|
||||
|
||||
sender.sendMessage(message);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -44,7 +44,9 @@ public enum NMSVersion {
|
||||
SPIGOT_1_16_R3("v1_16_R3"),
|
||||
SPIGOT_1_17_R1("v1_17_R1"),
|
||||
SPIGOT_1_18_R1("v1_18_R1"),
|
||||
SPIGOT_1_19("v1_19_R1");
|
||||
SPIGOT_1_19_R1("v1_19_R1"),
|
||||
SPIGOT_1_19_R2("v1_19_R2"),
|
||||
SPIGOT_1_19_R3("v1_19_R3");
|
||||
|
||||
private final String version;
|
||||
|
||||
|
@@ -53,6 +53,7 @@ import java.util.stream.Collectors;
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import me.clip.placeholderapi.expansion.cloud.CloudExpansion;
|
||||
import me.clip.placeholderapi.util.Msg;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Unmodifiable;
|
||||
|
||||
@@ -268,8 +269,7 @@ public final class CloudExpansionManager {
|
||||
await.remove(toIndexName(expansion));
|
||||
|
||||
if (exception != null) {
|
||||
plugin.getLogger().log(Level.SEVERE,
|
||||
"failed to download " + expansion.getName() + ":" + version.getVersion(), exception);
|
||||
Msg.severe("Failed to download %s:%s", exception, expansion.getName(), expansion.getVersion());
|
||||
}
|
||||
}, ASYNC_EXECUTOR);
|
||||
|
||||
|
@@ -216,6 +216,12 @@ public final class LocalExpansionManager implements Listener {
|
||||
if (!expansion.canRegister()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (expansions.containsKey(identifier)) {
|
||||
Msg.warn("Failed to load expansion %s. Identifier is already in use.",
|
||||
expansion.getIdentifier());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (expansion instanceof Configurable) {
|
||||
Map<String, Object> defaults = ((Configurable) expansion).getDefaults();
|
||||
@@ -388,7 +394,7 @@ public final class LocalExpansionManager implements Listener {
|
||||
@NotNull
|
||||
public CompletableFuture<@NotNull List<@Nullable Class<? extends PlaceholderExpansion>>> findExpansionsOnDisk() {
|
||||
File[] files = folder.listFiles((dir, name) -> name.endsWith(".jar"));
|
||||
if(files == null){
|
||||
if (files == null) {
|
||||
return CompletableFuture.completedFuture(Collections.emptyList());
|
||||
}
|
||||
|
||||
@@ -420,12 +426,11 @@ public final class LocalExpansionManager implements Listener {
|
||||
}
|
||||
|
||||
return expansionClass;
|
||||
} catch (final VerifyError ex) {
|
||||
Msg.severe("Failed to load expansion class %s (is a dependency missing?", file.getName() + ')');
|
||||
Msg.severe("Cause: %s %s", ex.getClass().getSimpleName(), ex.getMessage());
|
||||
} catch (VerifyError | NoClassDefFoundError e) {
|
||||
Msg.severe("Failed to load expansion %s (is a dependency missing?)", e, file.getName());
|
||||
return null;
|
||||
} catch (final Exception ex) {
|
||||
throw new CompletionException(ex);
|
||||
} catch (Exception e) {
|
||||
throw new CompletionException(e.getMessage() + " (expansion file: " + file.getAbsolutePath() + ")", e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
name: "@name@"
|
||||
name: PlaceholderAPI
|
||||
main: "me.clip.placeholderapi.PlaceholderAPIPlugin"
|
||||
|
||||
version: "@version@"
|
||||
version: ${version}
|
||||
author: HelpChat
|
||||
|
||||
api-version: "1.13"
|
||||
description: "@description@"
|
||||
description: "An awesome placeholder provider!"
|
||||
|
||||
commands:
|
||||
placeholderapi:
|
||||
|
Reference in New Issue
Block a user