mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-23 08:59:28 +00:00
1.4.0 beta
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package net.momirealms.customcrops.utils;
|
||||
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
import net.momirealms.customcrops.datamanager.ConfigManager;
|
||||
import net.momirealms.customcrops.CustomCrops;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class Placeholders extends PlaceholderExpansion{
|
||||
|
||||
public Placeholders(CustomCrops customCrops) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getIdentifier() {
|
||||
return "customcrops";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getAuthor() {
|
||||
return "XiaoMoMi";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull String getVersion() {
|
||||
return "1.0";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onRequest(OfflinePlayer player, String params) {
|
||||
|
||||
if(params.equalsIgnoreCase("season")){
|
||||
return ConfigManager.Config.current
|
||||
.replace("spring", ConfigManager.Config.spring)
|
||||
.replace("summer", ConfigManager.Config.summer)
|
||||
.replace("autumn", ConfigManager.Config.autumn)
|
||||
.replace("winter", ConfigManager.Config.winter);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user