mirror of
https://github.com/Verdurae/PlaceholderPlus.git
synced 2026-11-25 14:24:32 +08:00
updata
This commit is contained in:
1 parent
77517edc1d
commit
b22fb34efc
11 files changed
+281
-4
No files matched your search
@@ -0,0 +1,30 @@
|
||||
package org.verdurae.placeholderplus;
|
||||
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.verdurae.placeholderplus.API.PlayerAPI;
|
||||
|
||||
public class ThisPlaceholder extends PlaceholderExpansion {
|
||||
@Override
|
||||
public @Nullable("null") String onRequest(OfflinePlayer player, @NotNull String params) {
|
||||
String a = PlayerAPI.getPlayerData(player.getName()).getString(params);
|
||||
return (a == null) ? PlaceholderPlus.config.getString("Placeholders." + params) : a;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getIdentifier() {
|
||||
return "pp";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getAuthor() {
|
||||
return "Kaminy";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getVersion() {
|
||||
return PlaceholderPlus.instance.getDescription().getVersion();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user