Update methods, and make placeholders persist

Previously, when you reloaded placeholderapi, the DXL expansion would get unloaded. This aims to prevent it from unloading whenever PAPI was reloaded. It also updates the onRequest() method
This commit is contained in:
Maroon28 2021-09-28 09:33:25 +02:00 committed by GitHub
parent 1a2ac92c27
commit 8a4b1320bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -56,9 +56,14 @@ public class PlaceholderUtil extends PlaceholderExpansion {
public String getVersion() {
return plugin.getDescription().getVersion();
}
@Override
public boolean persist() {
return true;
}
@Override
public String onPlaceholderRequest(Player player, String identifier) {
public String onRequest(OfflinePlayer player, String identifier) {
if (player == null) {
return "";
}