mirror of
https://github.com/CarmJos/MineConfiguration.git
synced 2026-06-04 13:55:03 +08:00
feat(deps): Update with EasyConfiguration
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>mineconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<properties>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>mineconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ public class ConfiguredMessage<M> extends ConfiguredText<M, CommandSender> {
|
||||
super(manifest, parser, compiler, dispatcher, params);
|
||||
}
|
||||
|
||||
public void sendActionBar(Player player, Object... values) {
|
||||
public void sendActionBar(@NotNull Player player, Object... values) {
|
||||
ActionBar.sendActionBar(player, prepare(values).parseLine(player, (sender, message) -> message));
|
||||
}
|
||||
|
||||
|
||||
+2
-13
@@ -7,7 +7,6 @@ import cc.carm.lib.configuration.source.ConfigurationHolder;
|
||||
import cc.carm.lib.configuration.source.section.ConfigureSection;
|
||||
import cc.carm.lib.configuration.value.ValueManifest;
|
||||
import cc.carm.lib.configuration.value.standard.ConfiguredValue;
|
||||
import cc.carm.lib.configuration.value.text.function.ContentHandler;
|
||||
import cc.carm.lib.easyplugin.utils.ColorParser;
|
||||
import com.cryptomorin.xseries.XItemStack;
|
||||
import org.bukkit.Material;
|
||||
@@ -22,7 +21,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.util.*;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
public class ConfiguredItem extends ConfiguredValue<ItemStack> {
|
||||
|
||||
@@ -40,15 +38,12 @@ public class ConfiguredItem extends ConfiguredValue<ItemStack> {
|
||||
);
|
||||
|
||||
protected final @NotNull BiFunction<Player, String, String> parser;
|
||||
protected final @NotNull UnaryOperator<String> paramBuilder;
|
||||
protected final @NotNull String[] params;
|
||||
|
||||
public ConfiguredItem(@NotNull ValueManifest<ItemStack, ItemStack> manifest, ValueAdapter<ItemStack> adapter,
|
||||
@NotNull BiFunction<Player, String, String> parser,
|
||||
@NotNull UnaryOperator<String> paramBuilder, @NotNull String[] params) {
|
||||
@NotNull BiFunction<Player, String, String> parser, @NotNull String[] params) {
|
||||
super(manifest, adapter);
|
||||
this.parser = parser;
|
||||
this.paramBuilder = paramBuilder;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@@ -124,7 +119,6 @@ public class ConfiguredItem extends ConfiguredValue<ItemStack> {
|
||||
protected @Nullable ItemStack item = null;
|
||||
protected @NotNull String[] params = new String[0];
|
||||
protected @NotNull BiFunction<Player, String, String> parser = (player, message) -> ColorParser.parse(message);
|
||||
protected @NotNull UnaryOperator<String> paramFormatter = ContentHandler.DEFAULT_PARAM_BUILDER;
|
||||
|
||||
public Builder() {
|
||||
super(ConfigurationHolder.class, ITEM_TYPE);
|
||||
@@ -197,11 +191,6 @@ public class ConfiguredItem extends ConfiguredValue<ItemStack> {
|
||||
return self();
|
||||
}
|
||||
|
||||
public Builder formatParam(@NotNull UnaryOperator<String> paramFormatter) {
|
||||
this.paramFormatter = paramFormatter;
|
||||
return self();
|
||||
}
|
||||
|
||||
public Builder params(@NotNull String... params) {
|
||||
this.params = params;
|
||||
return self();
|
||||
@@ -219,7 +208,7 @@ public class ConfiguredItem extends ConfiguredValue<ItemStack> {
|
||||
|
||||
@Override
|
||||
public @NotNull ConfiguredItem build() {
|
||||
return new ConfiguredItem(buildManifest(), ITEM_ADAPTER, parser, paramFormatter, params);
|
||||
return new ConfiguredItem(buildManifest(), ITEM_ADAPTER, parser, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -20,13 +20,10 @@ import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public abstract class ItemModifier<S extends ItemModifier<S, R>, R>
|
||||
extends ContentHandler<Player, S> {
|
||||
|
||||
public static final @NotNull Pattern LORE_INSERT_PATTERN = Pattern.compile("^(?:\\{(.*)})?#(.*)#(?:\\{(-?\\d+)(?:,(-?\\d+))?})?$");
|
||||
|
||||
|
||||
protected final @NotNull Function<@NotNull Player, @Nullable ItemStack> itemProvider;
|
||||
|
||||
protected @NotNull BiConsumer<ItemStack, Player> itemConsumer;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>mineconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>mineconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||
|
||||
<deps.configured.version>4.1.2</deps.configured.version>
|
||||
<deps.configured.version>4.1.3</deps.configured.version>
|
||||
<deps.yamlcommentwriter.version>1.2.1</deps.yamlcommentwriter.version>
|
||||
<deps.easyplugin.version>1.5.12</deps.easyplugin.version>
|
||||
</properties>
|
||||
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<artifactId>mineconfiguration-parent</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.1.1</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>common</module>
|
||||
|
||||
Reference in New Issue
Block a user