From d4471f28457ef01d2547db09bf87ebb5468610a6 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Wed, 20 Jul 2022 16:26:29 +0200 Subject: [PATCH] new Maven module again + now generates javadoc --- .../java/fr/pandacube/lib/net/PSocket.java | 2 + pandalib-paper-reflect/pom.xml | 61 +++++++++++++++++++ .../lib/paper/reflect/NMSReflect.java | 44 ++++++------- .../lib/paper/reflect/NMSTypeWrapper.java | 44 ++++++------- .../lib/paper/reflect/OBCReflect.java | 0 .../paper/reflect/PandalibPaperReflect.java | 11 ++++ .../reflect/wrapper/ConcreteWrapper.java | 0 .../reflect/wrapper/ReflectListWrapper.java | 0 .../paper/reflect/wrapper/ReflectWrapper.java | 0 .../reflect/wrapper/ReflectWrapperI.java | 0 .../reflect/wrapper/ReflectWrapperTyped.java | 0 .../reflect/wrapper/ReflectWrapperTypedI.java | 0 .../reflect/wrapper/WrapperRegistry.java | 0 .../wrapper/brigadier/CommandNode.java | 0 .../wrapper/craftbukkit/CraftMapView.java | 0 .../craftbukkit/CraftNamespacedKey.java | 0 .../wrapper/craftbukkit/CraftPlayer.java | 0 .../wrapper/craftbukkit/CraftServer.java | 0 .../wrapper/craftbukkit/CraftVector.java | 0 .../wrapper/craftbukkit/CraftWorld.java | 0 .../wrapper/craftbukkit/RenderData.java | 0 .../craftbukkit/VanillaCommandWrapper.java | 0 .../wrapper/minecraft/DetectedVersion.java | 0 .../wrapper/minecraft/SharedConstants.java | 0 .../wrapper/minecraft/WorldVersion.java | 0 .../minecraft/commands/BlockPosArgument.java | 0 .../commands/CommandSourceStack.java | 0 .../wrapper/minecraft/commands/Commands.java | 0 .../minecraft/commands/ComponentArgument.java | 0 .../minecraft/commands/Coordinates.java | 0 .../minecraft/commands/EntityArgument.java | 0 .../minecraft/commands/EntitySelector.java | 0 .../commands/GameProfileArgument.java | 0 .../commands/ResourceLocationArgument.java | 0 .../minecraft/commands/Vec3Argument.java | 0 .../wrapper/minecraft/core/BlockPos.java | 0 .../reflect/wrapper/minecraft/core/Vec3i.java | 0 .../wrapper/minecraft/nbt/CompoundTag.java | 0 .../reflect/wrapper/minecraft/nbt/NbtIo.java | 0 .../wrapper/minecraft/nbt/StringTag.java | 0 .../reflect/wrapper/minecraft/nbt/Tag.java | 0 .../minecraft/network/FriendlyByteBuf.java | 0 .../minecraft/network/chat/Component.java | 0 .../ClientboundCustomPayloadPacket.java | 0 .../protocol/ClientboundGameEventPacket.java | 0 .../minecraft/network/protocol/Packet.java | 0 .../minecraft/resources/ResourceLocation.java | 0 .../wrapper/minecraft/server/ChunkMap.java | 0 .../minecraft/server/DedicatedPlayerList.java | 0 .../minecraft/server/DedicatedServer.java | 0 .../server/DedicatedServerProperties.java | 0 .../minecraft/server/MinecraftServer.java | 0 .../minecraft/server/ServerChunkCache.java | 0 .../server/ServerGamePacketListenerImpl.java | 0 .../wrapper/minecraft/server/ServerLevel.java | 0 .../minecraft/server/ServerPlayer.java | 0 .../wrapper/minecraft/server/Settings.java | 0 .../minecraft/util/ProgressListener.java | 0 .../reflect/wrapper/minecraft/world/AABB.java | 0 .../wrapper/minecraft/world/ChunkPos.java | 0 .../wrapper/minecraft/world/ChunkStorage.java | 0 .../wrapper/minecraft/world/DamageSource.java | 0 .../wrapper/minecraft/world/Entity.java | 0 .../wrapper/minecraft/world/Level.java | 0 .../minecraft/world/MapItemSavedData.java | 0 .../wrapper/minecraft/world/SavedData.java | 0 .../reflect/wrapper/minecraft/world/Vec3.java | 0 .../wrapper/minecraft/world/VoxelShape.java | 0 .../minecraft/world/block/BambooBlock.java | 0 .../paper/reflect/wrapper/netty/ByteBuf.java | 0 .../paper/reflect/wrapper/netty/Unpooled.java | 0 .../reflect/wrapper/paper/AABBVoxelShape.java | 0 .../reflect/wrapper/paper/PaperAdventure.java | 0 .../paper/QueuedChangesMapLong2Object.java | 0 .../configuration/FallbackValue_Int.java | 0 .../configuration/WorldConfiguration.java | 0 pandalib-paper/pom.xml | 8 --- .../fr/pandacube/lib/paper/PandaLibPaper.java | 6 -- .../pandacube/lib/paper/util/BukkitEvent.java | 9 +-- .../lib/paper/util/GeometryUtil.java | 22 ++++--- .../fr/pandacube/lib/util/CronExpression.java | 59 +++++++----------- .../pandacube/lib/util/IteratorIterator.java | 2 +- pom.xml | 35 ++++++++++- 83 files changed, 193 insertions(+), 110 deletions(-) create mode 100644 pandalib-paper-reflect/pom.xml rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java (93%) rename pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/Type.java => pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSTypeWrapper.java (73%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/OBCReflect.java (100%) create mode 100644 pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/PandalibPaperReflect.java rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ConcreteWrapper.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectListWrapper.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapper.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperI.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTyped.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTypedI.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/WrapperRegistry.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/brigadier/CommandNode.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftMapView.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftNamespacedKey.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftPlayer.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftServer.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftVector.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftWorld.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/RenderData.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/VanillaCommandWrapper.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/DetectedVersion.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/SharedConstants.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/WorldVersion.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/BlockPosArgument.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/CommandSourceStack.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Commands.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ComponentArgument.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Coordinates.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntityArgument.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntitySelector.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/GameProfileArgument.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ResourceLocationArgument.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Vec3Argument.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/BlockPos.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/Vec3i.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/CompoundTag.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/NbtIo.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/StringTag.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/Tag.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/FriendlyByteBuf.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/chat/Component.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/Packet.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/resources/ResourceLocation.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ChunkMap.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedPlayerList.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServer.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServerProperties.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/MinecraftServer.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerChunkCache.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerGamePacketListenerImpl.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerLevel.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerPlayer.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/Settings.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/util/ProgressListener.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/AABB.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkPos.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkStorage.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Entity.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Level.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/MapItemSavedData.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/SavedData.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Vec3.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/VoxelShape.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/block/BambooBlock.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/ByteBuf.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/Unpooled.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/AABBVoxelShape.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/PaperAdventure.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/QueuedChangesMapLong2Object.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/FallbackValue_Int.java (100%) rename {pandalib-paper => pandalib-paper-reflect}/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/WorldConfiguration.java (100%) diff --git a/pandalib-net/src/main/java/fr/pandacube/lib/net/PSocket.java b/pandalib-net/src/main/java/fr/pandacube/lib/net/PSocket.java index 8589775..f7bd9a1 100644 --- a/pandalib-net/src/main/java/fr/pandacube/lib/net/PSocket.java +++ b/pandalib-net/src/main/java/fr/pandacube/lib/net/PSocket.java @@ -25,11 +25,13 @@ import fr.pandacube.lib.util.Log; * as wrapper for the target {@link ServerSocket}. *
* This class provides a simple way to exchange data between client and server : + * * */ @Beta diff --git a/pandalib-paper-reflect/pom.xml b/pandalib-paper-reflect/pom.xml new file mode 100644 index 0000000..84ac54a --- /dev/null +++ b/pandalib-paper-reflect/pom.xml @@ -0,0 +1,61 @@ + + + + pandalib-parent + fr.pandacube.lib + 1.0-SNAPSHOT + + 4.0.0 + + pandalib-paper-reflect + + + + papermc + https://papermc.io/repo/repository/maven-public/ + + + fabricmc + https://maven.fabricmc.net/ + + + + + + + fr.pandacube.lib + pandalib-util + ${project.version} + + + + fr.pandacube.lib + pandalib-reflect + ${project.version} + + + + + io.papermc.paper + paper-api + ${paper.version}-SNAPSHOT + + + io.papermc.paper + paper-mojangapi + ${paper.version}-SNAPSHOT + + + + + + net.fabricmc + mapping-io + 0.3.0 + provided + + + + \ No newline at end of file diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java similarity index 93% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java index 5529289..ce806b2 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java +++ b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSReflect.java @@ -337,14 +337,14 @@ public class NMSReflect { * @param mojName the Mojang mapped name of the method. * @param mojParametersType the list of parameters of the method. * Each parameter type must be an instance of one of the following type: - * {@link Type}, {@link Class}, {@link ReflectClass} or {@link ClassMapping}. + * {@link NMSTypeWrapper}, {@link Class}, {@link ReflectClass} or {@link ClassMapping}. * @throws IllegalArgumentException if one of the parameter has an invalid type * @throws NullPointerException if one of the parameter is null, or if there is no mapping for the provided Mojang mapped method. * @throws ClassNotFoundException if there is no runtime class to represent one of the provided parametersType. * @throws NoSuchMethodException if there is no runtime method to represent the provided method. */ public ReflectMethod mojMethod(String mojName, Object... mojParametersType) throws ClassNotFoundException, NoSuchMethodException { - MethodId mId = new MethodId(mojName, Type.toTypeList(Arrays.asList(mojParametersType))); + MethodId mId = new MethodId(mojName, NMSTypeWrapper.toTypeList(Arrays.asList(mojParametersType))); MemberMapping> mm = methodsByMoj.get(mId); Objects.requireNonNull(mm, "Unable to find the Mojang mapped method " + mId); @@ -396,8 +396,8 @@ public class NMSReflect { - /* package */ Type toType(boolean obf) { - return new Type(obf ? obfName : mojName, 0); + /* package */ NMSTypeWrapper toType(boolean obf) { + return new NMSTypeWrapper(obf ? obfName : mojName, 0); } @@ -418,30 +418,30 @@ public class NMSReflect { String classPackages = classToPrint.substring(0, Math.max(packageSep, 0)); String classHTML = (packageSep >= 0 ? (classPackages + ".") : "") + "" + classSimpleName + ""; - Type superClass = superClass(obf); + NMSTypeWrapper superClass = superClass(obf); String superClassHTML = superClass == null ? "" : (" extends " + superClass.toHTML(obf)); - List superInterfaces = superInterfaces(obf); + List superInterfaces = superInterfaces(obf); String superInterfacesHTML = superInterfaces.isEmpty() ? "" : (" implements " + superInterfaces.stream().map(t -> t.toHTML(obf)).collect(Collectors.joining(", "))); return classHTML + superClassHTML + superInterfacesHTML; } - private Type superClass(boolean obf) { + private NMSTypeWrapper superClass(boolean obf) { Class superClass = runtimeClass().getSuperclass(); if (superClass == null || superClass.equals(Object.class) || superClass.equals(Enum.class) || superClass.equals(Record.class)) return null; ClassMapping cm = (IS_SERVER_OBFUSCATED ? CLASSES_BY_OBF : CLASSES_BY_MOJ).get(superClass.getName()); - return (cm != null) ? cm.toType(obf) : Type.of(superClass); + return (cm != null) ? cm.toType(obf) : NMSTypeWrapper.of(superClass); } - private List superInterfaces(boolean obf) { + private List superInterfaces(boolean obf) { Class[] interfaces = runtimeClass().getInterfaces(); - List types = new ArrayList<>(interfaces.length); + List types = new ArrayList<>(interfaces.length); for (Class interfce : interfaces) { ClassMapping cm = (IS_SERVER_OBFUSCATED ? CLASSES_BY_OBF : CLASSES_BY_MOJ).get(interfce.getName()); - types.add((cm != null) ? cm.toType(obf) : Type.of(interfce)); + types.add((cm != null) ? cm.toType(obf) : NMSTypeWrapper.of(interfce)); } return types; } @@ -451,12 +451,12 @@ public class NMSReflect { String classObfSimpleName = obfName.substring(obfName.lastIndexOf('.') + 1); String classMojSimpleName = mojName.substring(mojName.lastIndexOf('.') + 1); for (Constructor ct : runtimeClass().getDeclaredConstructors()) { - List obfParams = new ArrayList<>(); - List mojParams = new ArrayList<>(); + List obfParams = new ArrayList<>(); + List mojParams = new ArrayList<>(); for (Class param : ct.getParameterTypes()) { ClassMapping cm = (IS_SERVER_OBFUSCATED ? CLASSES_BY_OBF : CLASSES_BY_MOJ).get(param.getName()); if (cm == null) { - Type t = Type.of(param); + NMSTypeWrapper t = NMSTypeWrapper.of(param); obfParams.add(t); mojParams.add(t); } @@ -482,7 +482,7 @@ public class NMSReflect { - private record MethodId(String name, List parametersType) implements Comparable { + private record MethodId(String name, List parametersType) implements Comparable { @Override public int compareTo(MethodId o) { int cmp = name.compareTo(o.name); @@ -502,7 +502,7 @@ public class NMSReflect { } public String toString() { - String paramsStr = parametersType.stream().map(Type::toString).collect(Collectors.joining(", ")); + String paramsStr = parametersType.stream().map(NMSTypeWrapper::toString).collect(Collectors.joining(", ")); return name + "(" + paramsStr + ")"; } @@ -510,7 +510,7 @@ public class NMSReflect { - private record MemberDesc>(I identifier, Type returnType) { + private record MemberDesc>(I identifier, NMSTypeWrapper returnType) { private String toHTML(boolean isObfClass, boolean isStatic, boolean isFinal) { String identifierHTML = ""; if (identifier instanceof MethodId mId) @@ -533,14 +533,14 @@ public class NMSReflect { if (r != '(') throw new IllegalArgumentException("Invalid method description '" + desc + "'. Must start with '('."); - List paramsType = new ArrayList<>(); + List paramsType = new ArrayList<>(); while (((char) descReader.read()) != ')') { descReader.skip(-1); - paramsType.add(Type.parse(descReader)); + paramsType.add(NMSTypeWrapper.parse(descReader)); } - Type retType = Type.parse(descReader); + NMSTypeWrapper retType = NMSTypeWrapper.parse(descReader); return new MemberDesc<>(new MethodId(member.getName(namespace), Collections.unmodifiableList(paramsType)), retType); } catch (IOException e) { throw new RuntimeException("StringReader read error", e); @@ -551,7 +551,7 @@ public class NMSReflect { private static MemberDesc of(MappingTree.FieldMapping member, String namespace) { StringReader descReader = new StringReader(member.getDesc(namespace)); - return new MemberDesc<>(member.getName(namespace), Type.parse(descReader)); + return new MemberDesc<>(member.getName(namespace), NMSTypeWrapper.parse(descReader)); } } @@ -604,7 +604,7 @@ public class NMSReflect { @Override ReflectMethod getReflectMember() throws ClassNotFoundException, NoSuchMethodException { MethodId id = getReflectDesc().identifier; - return declaringClass.runtimeReflectClass.method(id.name, Type.toClassArray(id.parametersType)); + return declaringClass.runtimeReflectClass.method(id.name, NMSTypeWrapper.toClassArray(id.parametersType)); } }; } diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/Type.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSTypeWrapper.java similarity index 73% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/Type.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSTypeWrapper.java index fb7ffa8..15dce73 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/Type.java +++ b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/NMSTypeWrapper.java @@ -9,18 +9,18 @@ import java.util.Objects; import fr.pandacube.lib.reflect.Reflect.ReflectClass; import fr.pandacube.lib.paper.reflect.NMSReflect.ClassMapping; -public class Type implements Comparable { +/* package */ class NMSTypeWrapper implements Comparable { private final String type; private final int arrayDepth; - /* package */ Type(String type, int arrayDepth) { + /* package */ NMSTypeWrapper(String type, int arrayDepth) { this.type = type; this.arrayDepth = arrayDepth; } @Override public boolean equals(Object obj) { - return obj instanceof Type ot && type.equals(ot.type) && arrayDepth == ot.arrayDepth; + return obj instanceof NMSTypeWrapper ot && type.equals(ot.type) && arrayDepth == ot.arrayDepth; } @Override public int hashCode() { @@ -28,7 +28,7 @@ public class Type implements Comparable { } @Override - public int compareTo(Type o) { + public int compareTo(NMSTypeWrapper o) { return toString().compareTo(o.toString()); } @@ -54,36 +54,36 @@ public class Type implements Comparable { return cl; } - public Type arrayType() { - return new Type(type, arrayDepth + 1); + public NMSTypeWrapper arrayType() { + return new NMSTypeWrapper(type, arrayDepth + 1); } - /* package */ static Type of(Class cl) { + /* package */ static NMSTypeWrapper of(Class cl) { int arrayDepth = 0; while (cl.isArray()) { cl = cl.getComponentType(); arrayDepth++; } - return new Type(cl.getName(), arrayDepth); + return new NMSTypeWrapper(cl.getName(), arrayDepth); } - public static Type of(ReflectClass rc) { + public static NMSTypeWrapper of(ReflectClass rc) { return arrayOf(rc, 0); } - public static Type arrayOf(ReflectClass rc, int arrayDepth) { - return new Type(rc.get().getName(), arrayDepth); + public static NMSTypeWrapper arrayOf(ReflectClass rc, int arrayDepth) { + return new NMSTypeWrapper(rc.get().getName(), arrayDepth); } - public static Type mojOf(ClassMapping cm) { + public static NMSTypeWrapper mojOf(ClassMapping cm) { return arrayMojOf(cm, 0); } - public static Type arrayMojOf(ClassMapping cm, int arrayDepth) { - return new Type(cm.mojName, arrayDepth); + public static NMSTypeWrapper arrayMojOf(ClassMapping cm, int arrayDepth) { + return new NMSTypeWrapper(cm.mojName, arrayDepth); } - /* package */ static Type toType(Object typeObj) { + /* package */ static NMSTypeWrapper toType(Object typeObj) { Objects.requireNonNull(typeObj, "typeObj cannot be null"); if (typeObj instanceof Class cl) { return of(cl); @@ -94,7 +94,7 @@ public class Type implements Comparable { else if (typeObj instanceof ReflectClass rc) { return of(rc); } - else if (typeObj instanceof Type t) { + else if (typeObj instanceof NMSTypeWrapper t) { return t; } else @@ -139,7 +139,7 @@ public class Type implements Comparable { - /* package */ static Type parse(StringReader desc) { + /* package */ static NMSTypeWrapper parse(StringReader desc) { try { int arrayDepth = 0; char c; @@ -165,7 +165,7 @@ public class Type implements Comparable { } default -> "void"; }; - return new Type(type, arrayDepth); + return new NMSTypeWrapper(type, arrayDepth); } catch (IOException e) { throw new RuntimeException("StringReader read error", e); } @@ -174,12 +174,12 @@ public class Type implements Comparable { - /* package */ static List toTypeList(List paramsType) { - List types = new ArrayList<>(paramsType.size()); + /* package */ static List toTypeList(List paramsType) { + List types = new ArrayList<>(paramsType.size()); for (int i = 0; i < paramsType.size(); i++) { Object param = paramsType.get(i); try { - types.add(Type.toType(param)); + types.add(NMSTypeWrapper.toType(param)); } catch (NullPointerException|IllegalArgumentException e) { throw new IllegalArgumentException("Invalid parameterType at index " + i, e); } @@ -187,7 +187,7 @@ public class Type implements Comparable { return types; } - /* package */ static Class[] toClassArray(List types) throws ClassNotFoundException { + /* package */ static Class[] toClassArray(List types) throws ClassNotFoundException { Class[] classes = new Class[types.size()]; for (int i = 0; i < types.size(); i++) { classes[i] = types.get(i).toClass(); diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/OBCReflect.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/OBCReflect.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/OBCReflect.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/OBCReflect.java diff --git a/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/PandalibPaperReflect.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/PandalibPaperReflect.java new file mode 100644 index 0000000..025e445 --- /dev/null +++ b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/PandalibPaperReflect.java @@ -0,0 +1,11 @@ +package fr.pandacube.lib.paper.reflect; + +import fr.pandacube.lib.paper.reflect.wrapper.WrapperRegistry; + +public class PandalibPaperReflect { + + public static void init() { + NMSReflect.init(); + WrapperRegistry.init(); + } +} diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ConcreteWrapper.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ConcreteWrapper.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ConcreteWrapper.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ConcreteWrapper.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectListWrapper.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectListWrapper.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectListWrapper.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectListWrapper.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapper.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapper.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapper.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapper.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperI.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperI.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperI.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperI.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTyped.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTyped.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTyped.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTyped.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTypedI.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTypedI.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTypedI.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/ReflectWrapperTypedI.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/WrapperRegistry.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/WrapperRegistry.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/WrapperRegistry.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/WrapperRegistry.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/brigadier/CommandNode.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/brigadier/CommandNode.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/brigadier/CommandNode.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/brigadier/CommandNode.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftMapView.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftMapView.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftMapView.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftMapView.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftNamespacedKey.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftNamespacedKey.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftNamespacedKey.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftNamespacedKey.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftPlayer.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftPlayer.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftPlayer.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftPlayer.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftServer.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftServer.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftServer.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftServer.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftVector.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftVector.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftVector.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftVector.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftWorld.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftWorld.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftWorld.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/CraftWorld.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/RenderData.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/RenderData.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/RenderData.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/RenderData.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/VanillaCommandWrapper.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/VanillaCommandWrapper.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/VanillaCommandWrapper.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/craftbukkit/VanillaCommandWrapper.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/DetectedVersion.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/DetectedVersion.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/DetectedVersion.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/DetectedVersion.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/SharedConstants.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/SharedConstants.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/SharedConstants.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/SharedConstants.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/WorldVersion.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/WorldVersion.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/WorldVersion.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/WorldVersion.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/BlockPosArgument.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/BlockPosArgument.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/BlockPosArgument.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/BlockPosArgument.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/CommandSourceStack.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/CommandSourceStack.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/CommandSourceStack.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/CommandSourceStack.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Commands.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Commands.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Commands.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Commands.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ComponentArgument.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ComponentArgument.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ComponentArgument.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ComponentArgument.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Coordinates.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Coordinates.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Coordinates.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Coordinates.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntityArgument.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntityArgument.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntityArgument.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntityArgument.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntitySelector.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntitySelector.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntitySelector.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/EntitySelector.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/GameProfileArgument.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/GameProfileArgument.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/GameProfileArgument.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/GameProfileArgument.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ResourceLocationArgument.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ResourceLocationArgument.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ResourceLocationArgument.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/ResourceLocationArgument.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Vec3Argument.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Vec3Argument.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Vec3Argument.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/commands/Vec3Argument.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/BlockPos.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/BlockPos.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/BlockPos.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/BlockPos.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/Vec3i.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/Vec3i.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/Vec3i.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/core/Vec3i.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/CompoundTag.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/CompoundTag.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/CompoundTag.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/CompoundTag.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/NbtIo.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/NbtIo.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/NbtIo.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/NbtIo.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/StringTag.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/StringTag.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/StringTag.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/StringTag.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/Tag.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/Tag.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/Tag.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/nbt/Tag.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/FriendlyByteBuf.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/FriendlyByteBuf.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/FriendlyByteBuf.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/FriendlyByteBuf.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/chat/Component.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/chat/Component.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/chat/Component.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/chat/Component.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundCustomPayloadPacket.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/ClientboundGameEventPacket.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/Packet.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/Packet.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/Packet.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/network/protocol/Packet.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/resources/ResourceLocation.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/resources/ResourceLocation.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/resources/ResourceLocation.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/resources/ResourceLocation.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ChunkMap.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ChunkMap.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ChunkMap.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ChunkMap.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedPlayerList.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedPlayerList.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedPlayerList.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedPlayerList.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServer.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServer.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServer.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServer.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServerProperties.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServerProperties.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServerProperties.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/DedicatedServerProperties.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/MinecraftServer.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/MinecraftServer.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/MinecraftServer.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/MinecraftServer.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerChunkCache.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerChunkCache.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerChunkCache.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerChunkCache.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerGamePacketListenerImpl.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerGamePacketListenerImpl.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerGamePacketListenerImpl.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerGamePacketListenerImpl.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerLevel.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerLevel.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerLevel.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerLevel.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerPlayer.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerPlayer.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerPlayer.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/ServerPlayer.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/Settings.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/Settings.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/Settings.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/server/Settings.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/util/ProgressListener.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/util/ProgressListener.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/util/ProgressListener.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/util/ProgressListener.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/AABB.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/AABB.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/AABB.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/AABB.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkPos.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkPos.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkPos.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkPos.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkStorage.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkStorage.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkStorage.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/ChunkStorage.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/DamageSource.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Entity.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Entity.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Entity.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Entity.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Level.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Level.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Level.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Level.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/MapItemSavedData.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/MapItemSavedData.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/MapItemSavedData.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/MapItemSavedData.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/SavedData.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/SavedData.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/SavedData.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/SavedData.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Vec3.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Vec3.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Vec3.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/Vec3.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/VoxelShape.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/VoxelShape.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/VoxelShape.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/VoxelShape.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/block/BambooBlock.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/block/BambooBlock.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/block/BambooBlock.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/minecraft/world/block/BambooBlock.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/ByteBuf.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/ByteBuf.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/ByteBuf.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/ByteBuf.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/Unpooled.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/Unpooled.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/Unpooled.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/netty/Unpooled.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/AABBVoxelShape.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/AABBVoxelShape.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/AABBVoxelShape.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/AABBVoxelShape.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/PaperAdventure.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/PaperAdventure.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/PaperAdventure.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/PaperAdventure.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/QueuedChangesMapLong2Object.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/QueuedChangesMapLong2Object.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/QueuedChangesMapLong2Object.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/QueuedChangesMapLong2Object.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/FallbackValue_Int.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/FallbackValue_Int.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/FallbackValue_Int.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/FallbackValue_Int.java diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/WorldConfiguration.java b/pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/WorldConfiguration.java similarity index 100% rename from pandalib-paper/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/WorldConfiguration.java rename to pandalib-paper-reflect/src/main/java/fr/pandacube/lib/paper/reflect/wrapper/paper/configuration/WorldConfiguration.java diff --git a/pandalib-paper/pom.xml b/pandalib-paper/pom.xml index a643802..75e4937 100644 --- a/pandalib-paper/pom.xml +++ b/pandalib-paper/pom.xml @@ -49,14 +49,6 @@ paper-mojangapi ${paper.version}-SNAPSHOT - - - - net.fabricmc - mapping-io - 0.3.0 - provided - \ No newline at end of file diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/PandaLibPaper.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/PandaLibPaper.java index 6d24b8b..bca175a 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/PandaLibPaper.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/PandaLibPaper.java @@ -1,7 +1,5 @@ package fr.pandacube.lib.paper; -import fr.pandacube.lib.paper.reflect.NMSReflect; -import fr.pandacube.lib.paper.reflect.wrapper.WrapperRegistry; import org.bukkit.plugin.Plugin; public class PandaLibPaper { @@ -10,10 +8,6 @@ public class PandaLibPaper { public static void init(Plugin plugin) { PandaLibPaper.plugin = plugin; - - NMSReflect.init(); - WrapperRegistry.init(); - } diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/BukkitEvent.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/BukkitEvent.java index 6012118..9cd15d0 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/BukkitEvent.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/BukkitEvent.java @@ -1,7 +1,8 @@ package fr.pandacube.lib.paper.util; -import fr.pandacube.lib.reflect.Reflect; -import fr.pandacube.lib.paper.PandaLibPaper; +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; + import org.bukkit.Bukkit; import org.bukkit.event.Event; import org.bukkit.event.EventException; @@ -12,8 +13,8 @@ import org.bukkit.plugin.EventExecutor; import org.bukkit.plugin.RegisteredListener; import org.bukkit.scheduler.BukkitTask; -import java.util.List; -import java.util.concurrent.atomic.AtomicReference; +import fr.pandacube.lib.paper.PandaLibPaper; +import fr.pandacube.lib.reflect.Reflect; public class BukkitEvent { diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/GeometryUtil.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/GeometryUtil.java index 9e348ab..8e8286e 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/GeometryUtil.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/util/GeometryUtil.java @@ -80,14 +80,16 @@ public class GeometryUtil { * @param playerLocation the location of the player, generally provided by {@link Player#getLocation()} * @param isSneaking if the player is sneaking. Generally {@link Player#isSneaking()} * @return an array of 8 {@link Location}s with x, y, and z values filled (yaw and pitch are ignored). - *
return[0] // top front left
-	 *return[1] // top front right
-	 *return[2] // bottom front left
-	 *return[3] // bottom front right
-	 *return[4] // top back left
-	 *return[5] // top back right
-	 *return[6] // bottom back left
-	 *return[7] // bottom back right
+	 * 
+	 * return[0] // top front left
+	 * return[1] // top front right
+	 * return[2] // bottom front left
+	 * return[3] // bottom front right
+	 * return[4] // top back left
+	 * return[5] // top back right
+	 * return[6] // bottom back left
+	 * return[7] // bottom back right
+	 * 
*/ public static Location[] getPlayerHeadGeometry(Location playerLocation, boolean isSneaking) { Location[] headAnglesPoints = new Location[8]; @@ -255,11 +257,11 @@ public class GeometryUtil { /** - * @param v the vector representing the direction. If v.getX() && v.getZ() are 0, + * @param v the vector representing the direction. If v.getX() and v.getZ() are 0, * the yaw will be 0. This may have inconsistence if the vector is calculated * from a {@link Location}'s yaw and pitch. In this case, prefer using * {@link #DirectionalVector(Location)}. The {@link Vector} is - * normalized if necessary (does not modify provided {@link Vector}). + * normalized if necessary (does not modify the provided {@link Vector}). */ public DirectionalVector(Vector v) { this(v.getX(), v.getY(), v.getZ()); diff --git a/pandalib-util/src/main/java/fr/pandacube/lib/util/CronExpression.java b/pandalib-util/src/main/java/fr/pandacube/lib/util/CronExpression.java index ea46150..33a2fbe 100644 --- a/pandalib-util/src/main/java/fr/pandacube/lib/util/CronExpression.java +++ b/pandalib-util/src/main/java/fr/pandacube/lib/util/CronExpression.java @@ -46,55 +46,42 @@ import java.util.regex.Pattern; * A cron expressions consists of 5 or 6 mandatory fields (seconds may be omitted) separated by space.
* These are: * - * + *
+ * * - * - * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * * - * - * - * + * + * + * * *
CRON fields
Field Allowable values Special CharactersFieldAllowable valuesSpecial Characters
Seconds (may be omitted)  - * 0-59  - * , - * /Seconds (may be omitted)0-59, - * /
Minutes  - * 0-59  - * , - * /Minutes0-59, - * /
Hours  - * 0-23  - * , - * /Hours0-23, - * /
Day of month  - * 1-31  - * , - * ? / L WDay of month1-31, - * ? / L W
Month  - * 1-12 or JAN-DEC (note: english abbreviations)  - * , - * /Month1-12 or JAN-DEC (note: english abbreviations), - * /
Day of week  - * 1-7 or MON-SUN (note: english abbreviations)  - * , - * ? / L #Day of week1-7 or MON-SUN (note: english abbreviations), - * ? / L #
* diff --git a/pandalib-util/src/main/java/fr/pandacube/lib/util/IteratorIterator.java b/pandalib-util/src/main/java/fr/pandacube/lib/util/IteratorIterator.java index d68ddec..b00f63a 100644 --- a/pandalib-util/src/main/java/fr/pandacube/lib/util/IteratorIterator.java +++ b/pandalib-util/src/main/java/fr/pandacube/lib/util/IteratorIterator.java @@ -61,7 +61,7 @@ public class IteratorIterator implements Iterator { } /** - * @implNote The current implementation of {@link IteratorIterator} may not support + * @implNote The current implementation of {@link IteratorIterator} may not support * running this method if the current position is the last value of one of * the underlying iterable, and if the {@link #hasNext()} method has been called before this one. */ diff --git a/pom.xml b/pom.xml index 5eee909..951cf75 100644 --- a/pom.xml +++ b/pom.xml @@ -56,6 +56,7 @@ pandalib-permissions pandalib-reflect pandalib-util + pandalib-paper-reflect @@ -90,7 +91,7 @@ org.apache.maven.plugins maven-jar-plugin - 2.4 + 3.2.2 @@ -114,6 +115,38 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.0 + + + attach-javadocs + + jar + + + + + + + apiNote + a + API Note: + + + implSpec + a + Implementation Requirements: + + + implNote + a + Implementation Note: + + + +