Initial commit working?
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
package com.sophiaatkinson.pronouns;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
|
||||
public class PronounsPlaceholder extends PlaceholderExpansion {
|
||||
|
||||
private final PronounsPlugin plugin;
|
||||
|
||||
public PronounsPlaceholder(PronounsPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getIdentifier() {
|
||||
return "pronounsplugin";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getAuthor() {
|
||||
return "Sophia";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getVersion() {
|
||||
return "1.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String onPlaceholderRequest(Player player, @NotNull String identifier) {
|
||||
if (identifier.equalsIgnoreCase("pronouns")) {
|
||||
String pronouns = plugin.getPronouns(player.getUniqueId());
|
||||
return pronouns != null ? pronouns : "not set";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user