refactor: write english
This commit is contained in:
parent
bb6fe9a6cd
commit
95f544a3ba
3 changed files with 18 additions and 3 deletions
|
@ -73,8 +73,18 @@
|
|||
<id>codemc-snapshots</id>
|
||||
<url>https://repo.codemc.io/repository/maven-snapshots/</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>placeholderapi</id>
|
||||
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>me.clip</groupId>
|
||||
<artifactId>placeholderapi</artifactId>
|
||||
<version>2.11.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
|
|
|
@ -9,11 +9,11 @@ import org.jetbrains.annotations.Nullable;
|
|||
|
||||
import java.util.Optional;
|
||||
|
||||
public class NickoExpension extends PlaceholderExpansion {
|
||||
public class NickoExpansion extends PlaceholderExpansion {
|
||||
|
||||
private final NickoBukkit instance;
|
||||
|
||||
public NickoExpension(NickoBukkit instance) {
|
||||
public NickoExpansion(NickoBukkit instance) {
|
||||
this.instance = instance;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,10 @@ public class NickoExpension extends PlaceholderExpansion {
|
|||
return "1.0.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean persist() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable String onPlaceholderRequest(Player player, @NotNull String params) {
|
||||
|
@ -43,6 +47,7 @@ public class NickoExpension extends PlaceholderExpansion {
|
|||
case "skin" -> profile.getSkin();
|
||||
case "locale" -> profile.getLocale().getName();
|
||||
case "bungeecord" -> String.valueOf(profile.isBungeecordTransfer());
|
||||
default -> null;
|
||||
};
|
||||
} else {
|
||||
instance.getLogger().severe("Couldn't satisfy request for placeholder " + params + ". This is a bug!");
|
|
@ -13,7 +13,7 @@ public class PlaceHolderHook {
|
|||
public void hook() {
|
||||
if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
|
||||
instance.getLogger().info("Enabling PlaceHolderAPI support...");
|
||||
new NickoExpension(instance).register();
|
||||
new NickoExpansion(instance).register();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue