9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-24 17:39:26 +00:00
This commit is contained in:
Xiao-MoMi
2022-08-10 18:26:05 +08:00
parent 6a0cf5f8ef
commit 3a06289fcb
4 changed files with 67 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
package net.momirealms.customcrops.api;
import net.momirealms.customcrops.CustomCrops;
import net.momirealms.customcrops.datamanager.SeasonManager;
public class CustomCropsAPI {
/**
* 获取插件实例
* @return 插件实例
*/
public static CustomCrops getPlugin(){
return CustomCrops.plugin;
}
/**
* 获取指定世界的季节
* @param worldName 世界名
* @return 那个世界的季节若不存在则返回null
*/
public static String getSeason(String worldName){
return SeasonManager.SEASON.get(worldName);
}
}