mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-22 16:39:36 +00:00
1.4.0
This commit is contained in:
@@ -10,8 +10,6 @@ import net.momirealms.customcrops.listener.RightClickBlock;
|
|||||||
import net.momirealms.customcrops.listener.RightClickCustomBlock;
|
import net.momirealms.customcrops.listener.RightClickCustomBlock;
|
||||||
import net.momirealms.customcrops.utils.Placeholders;
|
import net.momirealms.customcrops.utils.Placeholders;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -22,8 +20,6 @@ public final class CustomCrops extends JavaPlugin {
|
|||||||
|
|
||||||
public static JavaPlugin instance;
|
public static JavaPlugin instance;
|
||||||
public static CropTimer timer;
|
public static CropTimer timer;
|
||||||
public static CropManager cropManager;
|
|
||||||
public static SprinklerManager sprinklerManager;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
@@ -73,9 +69,7 @@ public final class CustomCrops extends JavaPlugin {
|
|||||||
new Placeholders(this).register();
|
new Placeholders(this).register();
|
||||||
MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] 检测到PlaceHolderAPI 已启用季节变量!",Bukkit.getConsoleSender());
|
MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] 检测到PlaceHolderAPI 已启用季节变量!",Bukkit.getConsoleSender());
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] 自定义农作物插件已启用!作者:小默米 QQ:3266959688",Bukkit.getConsoleSender());
|
MessageManager.consoleMessage("&#ccfbff-#ef96c5&[CustomCrops] 自定义农作物插件已启用!作者:小默米 QQ:3266959688",Bukkit.getConsoleSender());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -3,10 +3,8 @@ package net.momirealms.customcrops.datamanager;
|
|||||||
import net.momirealms.customcrops.CustomCrops;
|
import net.momirealms.customcrops.CustomCrops;
|
||||||
import net.momirealms.customcrops.utils.Crop;
|
import net.momirealms.customcrops.utils.Crop;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.scheduler.BukkitScheduler;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|||||||
@@ -191,6 +191,8 @@ public class CropManager {
|
|||||||
CustomBlock.remove(potLoc);
|
CustomBlock.remove(potLoc);
|
||||||
CustomBlock.place(ConfigManager.Config.pot, potLoc);
|
CustomBlock.place(ConfigManager.Config.pot, potLoc);
|
||||||
if(crop.getGiantChance() > Math.random()){
|
if(crop.getGiantChance() > Math.random()){
|
||||||
|
CROPS.remove(sLoc);
|
||||||
|
data.set(worldName+"."+coordinate[0]+","+coordinate[1]+","+coordinate[2], null);
|
||||||
CustomBlock.remove(sLoc);
|
CustomBlock.remove(sLoc);
|
||||||
CustomBlock.place(crop.getGiant(), sLoc);
|
CustomBlock.place(crop.getGiant(), sLoc);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user