mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-25 01:49:18 +00:00
2.0-r2
This commit is contained in:
@@ -105,7 +105,12 @@ public class MainConfig {
|
||||
worlds[i] = Bukkit.getWorld(worldsName.get(i));
|
||||
}
|
||||
}
|
||||
worldList = List.of(worlds);
|
||||
if (worlds != null) {
|
||||
worldList = List.of(worlds);
|
||||
}
|
||||
else {
|
||||
worldList = new ArrayList<>();
|
||||
}
|
||||
cropMode = config.getString("mechanics.crops-mode", "tripwire").equals("tripwire");
|
||||
limitation = config.getBoolean("optimization.limitation.enable", true);
|
||||
wireAmount = config.getInt("optimization.limitation.tripwire-amount", 64);
|
||||
|
||||
@@ -100,9 +100,6 @@ public class ItemsAdderWireHandler extends ItemsAdderHandler {
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
|
||||
final Player player = event.getPlayer();
|
||||
long time = System.currentTimeMillis();
|
||||
if (time - (coolDown.getOrDefault(player, time - 50)) < 50) return;
|
||||
coolDown.put(player, time);
|
||||
|
||||
super.onPlayerInteract(event);
|
||||
|
||||
@@ -154,6 +151,7 @@ public class ItemsAdderWireHandler extends ItemsAdderHandler {
|
||||
|
||||
//interact pot (must have an item)
|
||||
else if (blockID.equals(BasicItemConfig.wetPot) || blockID.equals(BasicItemConfig.dryPot)) {
|
||||
|
||||
if (!AntiGrief.testPlace(player, location)) return;
|
||||
|
||||
ItemStack itemInHand = event.getItem();
|
||||
|
||||
Reference in New Issue
Block a user