MC 1.21.4 + small fixes
This commit is contained in:
@@ -23,7 +23,7 @@ import java.util.Map;
|
||||
/**
|
||||
* Gson adapter for ConfigurationSerializable, an interface implemented by several classes in the Bukkit API to ease
|
||||
* serialization to YAML.
|
||||
*
|
||||
* <p>
|
||||
* To not reinvent the wheel, this class uses the Bukkit’s Yaml API to convert the objects from/to json.
|
||||
*/
|
||||
/* package */ class ConfigurationSerializableAdapter implements JsonSerializer<ConfigurationSerializable>, JsonDeserializer<ConfigurationSerializable> {
|
||||
|
@@ -14,7 +14,7 @@ import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx;
|
||||
|
||||
@ConcreteWrapper(Coordinates.__concrete.class)
|
||||
public interface Coordinates extends ReflectWrapperI {
|
||||
public static final ReflectClass<?> REFLECT = wrapEx(() -> Reflect.ofClass("net.minecraft.commands.arguments.coordinates.Coordinates"));
|
||||
ReflectClass<?> REFLECT = wrapEx(() -> Reflect.ofClass("net.minecraft.commands.arguments.coordinates.Coordinates"));
|
||||
ReflectMethod<?> getPosition = wrapEx(() -> REFLECT.method("getPosition", CommandSourceStack.REFLECT.get()));
|
||||
|
||||
default Vec3 getPosition(io.papermc.paper.command.brigadier.CommandSourceStack source) {
|
||||
|
@@ -7,7 +7,6 @@ import fr.pandacube.lib.reflect.ReflectMethod;
|
||||
import fr.pandacube.lib.reflect.wrapper.ReflectWrapperTyped;
|
||||
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import static fr.pandacube.lib.util.ThrowableUtil.wrapEx;
|
||||
import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx;
|
||||
|
@@ -19,7 +19,7 @@ public class PluginCommandNode extends ReflectWrapperTyped<LiteralCommandNode<Co
|
||||
public static final ReflectClass<?> REFLECT = wrapEx(() -> Reflect.ofClass("io.papermc.paper.command.brigadier.PluginCommandNode"));
|
||||
private static final ReflectMethod<?> getPlugin = wrapEx(() -> REFLECT.method("getPlugin"));
|
||||
private static final ReflectMethod<?> getDescription = wrapEx(() -> REFLECT.method("getDescription"));
|
||||
private static final ReflectConstructor CONSTRUCTOR = wrapEx(() -> REFLECT.constructor(String.class, PluginMeta.class, LiteralCommandNode.class, String.class));
|
||||
private static final ReflectConstructor<?> CONSTRUCTOR = wrapEx(() -> REFLECT.constructor(String.class, PluginMeta.class, LiteralCommandNode.class, String.class));
|
||||
|
||||
|
||||
public PluginCommandNode(@NotNull String literal, @NotNull PluginMeta plugin, @NotNull LiteralCommandNode<CommandSourceStack> rootLiteral, @Nullable String description) {
|
||||
|
Reference in New Issue
Block a user