mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-25 09:59:20 +00:00
add comments
This commit is contained in:
@@ -61,6 +61,7 @@ import java.io.InputStream;
|
||||
import java.nio.file.Path;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class BukkitCustomCropsPluginImpl extends BukkitCustomCropsPlugin {
|
||||
|
||||
@@ -91,6 +92,12 @@ public class BukkitCustomCropsPluginImpl extends BukkitCustomCropsPlugin {
|
||||
this.debugger.accept(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(Supplier<Object> message) {
|
||||
if (this.debugger != null)
|
||||
this.debugger.accept(message.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getResourceStream(String filePath) {
|
||||
return getBoostrap().getResource(filePath);
|
||||
|
||||
@@ -266,7 +266,8 @@ public class ConfigType {
|
||||
.storage(section.getInt("storage", 4))
|
||||
.infinite(section.getBoolean("infinite", false))
|
||||
.twoDItem(section.getString("2D-item"))
|
||||
.sprinklingAmount(section.getInt("water", 1))
|
||||
.wateringAmount(section.getInt("water", 1))
|
||||
.sprinklingAmount(section.getInt("sprinkling", 1))
|
||||
.threeDItem(section.getString("3D-item"))
|
||||
.threeDItemWithWater(section.getString("3D-item-with-water"))
|
||||
.wateringMethods(manager.getWateringMethods(section.getSection("fill-method")))
|
||||
|
||||
@@ -212,11 +212,6 @@ public class BukkitWorldAdaptor extends AbstractWorldAdaptor<World> {
|
||||
return world.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getWorldFullTime(World world) {
|
||||
return world.getFullTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int priority() {
|
||||
return BUKKIT_WORLD_PRIORITY;
|
||||
|
||||
@@ -169,6 +169,7 @@ public class BukkitItemManager extends AbstractItemManager {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FurnitureRotation remove(@NotNull Location location, @NotNull ExistenceForm form) {
|
||||
switch (form) {
|
||||
@@ -216,6 +217,7 @@ public class BukkitItemManager extends AbstractItemManager {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public FurnitureRotation removeFurniture(@NotNull Location location) {
|
||||
Collection<Entity> entities = location.getWorld().getNearbyEntities(LocationUtils.toSurfaceCenterLocation(location), 0.5,0.25,0.5);
|
||||
@@ -229,7 +231,7 @@ public class BukkitItemManager extends AbstractItemManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
return rotation;
|
||||
return rotation == null ? FurnitureRotation.NONE : rotation;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -329,7 +331,7 @@ public class BukkitItemManager extends AbstractItemManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item<ItemStack> wrap(ItemStack itemStack) {
|
||||
public Item<ItemStack> wrap(@NotNull ItemStack itemStack) {
|
||||
return factory.wrap(itemStack);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public class BukkitWorldManager implements WorldManager, Listener {
|
||||
|
||||
private final BukkitCustomCropsPlugin plugin;
|
||||
private final Set<WorldAdaptor<?>> adaptors = new TreeSet<>();
|
||||
private final TreeSet<WorldAdaptor<?>> adaptors = new TreeSet<>();
|
||||
private final ConcurrentHashMap<String, CustomCropsWorld<?>> worlds = new ConcurrentHashMap<>();
|
||||
private final HashMap<String, WorldSetting> worldSettings = new HashMap<>();
|
||||
private WorldSetting defaultWorldSetting;
|
||||
@@ -290,7 +290,7 @@ public class BukkitWorldManager implements WorldManager, Listener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<WorldAdaptor<?>> adaptors() {
|
||||
public TreeSet<WorldAdaptor<?>> adaptors() {
|
||||
return adaptors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user