mirror of
https://github.com/CarmJos/MineConfiguration.git
synced 2026-06-04 13:55:03 +08:00
build(deps): Update with EasyConfiguration
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>mineconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>3.0.0</version>
|
||||
<version>3.0.1</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+12
-11
@@ -6,7 +6,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.UnmodifiableView;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@@ -56,25 +55,27 @@ public class BukkitSection implements ConfigureSection {
|
||||
data().set(path, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(@NotNull String path) {
|
||||
return data().contains(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable List<?> getList(@NotNull String path) {
|
||||
return data().getList(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable ConfigureSection getSection(@NotNull String path) {
|
||||
Object value = get(path);
|
||||
if (value instanceof ConfigureSection) {
|
||||
return (ConfigureSection) value;
|
||||
} else if (value instanceof ConfigurationSection) {
|
||||
return new BukkitSection(source(), this, (ConfigurationSection) value);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ConfigureSection createSection(@NotNull Map<?, ?> data) {
|
||||
throw new UnsupportedOperationException("BukkitSection does not support this operation");
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ConfigureSection computeSection(@NotNull String path) {
|
||||
return new BukkitSection(source(), this, data.createSection(path));
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Object get(@NotNull String path) {
|
||||
Object value = data().get(path);
|
||||
|
||||
Reference in New Issue
Block a user