2.6.13 - Added Apache Commons Lang3 and Text. More 1.19 fixes.

This commit is contained in:
Fernando Pettinelli 2022-06-26 12:27:20 -04:00
parent b110a69285
commit 2929c628ed
30 changed files with 63 additions and 53 deletions

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@ -1,6 +1,6 @@
package com.songoda.core.compatibility;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.bukkit.Bukkit;
public enum ServerProject {

View File

@ -1,6 +1,6 @@
package com.songoda.core.compatibility;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.bukkit.Bukkit;
public enum ServerVersion {

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -65,14 +65,6 @@
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<includes>
<include>com.songoda:*</include>
<include>com.zaxxer:HikariCP</include>
<include>de.tr7zw:item-nbt-api</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.zaxxer</pattern>
@ -83,20 +75,22 @@
<pattern>de.tr7zw.changeme.nbtapi</pattern>
<shadedPattern>com.songoda.core.third_party.de.tr7zw.nbtapi</shadedPattern>
</relocation>
<relocation>
<pattern>org.apache.commons</pattern>
<shadedPattern>com.songoda.core.third_party.org.apache.commons</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<includes>
<include>com/</include>
<include>de/tr7zw/</include>
<include>META-INF/MANIFEST.MF</include>
<include>META-INF/maven/com.songoda/SongodaCore/</include>
</includes>
</filter>
</filters>
<artifactSet>
<includes>
<include>com.songoda:*</include>
<include>com.zaxxer:HikariCP</include>
<include>org.apache.commons:commons-text</include>
<include>org.apache.commons:commons-lang3</include>
<include>de.tr7zw:item-nbt-api</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
@ -122,7 +116,7 @@
<dependency>
<groupId>de.tr7zw</groupId>
<artifactId>item-nbt-api</artifactId>
<version>2.9.2</version>
<version>2.10.0</version>
<scope>compile</scope>
</dependency>

View File

@ -53,7 +53,7 @@ public class SongodaCore {
/**
* @since coreRevision 6
*/
private final static String coreVersion = "2.6.13-DEV";
private final static String coreVersion = "2.6.13";
/**
* This is specific to the website api

View File

@ -226,7 +226,9 @@ public class ChatMessage {
textList.addAll(this.textList);
Object packet;
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_19)) {
packet = mc_PacketPlayOutChat_new.newInstance(mc_IChatBaseComponent_ChatSerializer_a.invoke(null, gson.toJson(textList)), 0);
}else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
packet = mc_PacketPlayOutChat_new.newInstance(
mc_IChatBaseComponent_ChatSerializer_a.invoke(null, gson.toJson(textList)),
mc_chatMessageType_Chat.get(null),
@ -272,9 +274,11 @@ public class ChatMessage {
mc_IChatBaseComponent = ClassMapping.I_CHAT_BASE_COMPONENT.getClazz();
mc_IChatBaseComponent_ChatSerializer = ClassMapping.I_CHAT_BASE_COMPONENT.getClazz("ChatSerializer");
mc_IChatBaseComponent_ChatSerializer_a = mc_IChatBaseComponent_ChatSerializer.getMethod("a", String.class);
mc_PacketPlayOutChat = ClassMapping.PACKET_PLAY_OUT_CHAT.getClazz();
mc_PacketPlayOutChat = ServerVersion.isServerVersionAtLeast(ServerVersion.V1_19) ? ClassMapping.CLIENTBOUND_SYSTEM_CHAT.getClazz() : ClassMapping.PACKET_PLAY_OUT_CHAT.getClazz();
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_19)) {
mc_PacketPlayOutChat_new = mc_PacketPlayOutChat.getConstructor(mc_IChatBaseComponent, Integer.TYPE);
} else if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
mc_ChatMessageType = ClassMapping.CHAT_MESSAGE_TYPE.getClazz();
mc_chatMessageType_Chat = mc_ChatMessageType.getField(ServerVersion.isServerVersionAtLeast(ServerVersion.V1_17) ? "a" : "CHAT");
mc_PacketPlayOutChat_new = mc_PacketPlayOutChat.getConstructor(mc_IChatBaseComponent, mc_ChatMessageType, UUID.class);

View File

@ -1,7 +1,7 @@
package com.songoda.core.configuration;
import com.songoda.core.utils.TextUtils;
import org.apache.commons.lang.Validate;
import org.apache.commons.lang3.Validate;
import org.bukkit.Bukkit;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConstructor;

View File

@ -7,7 +7,7 @@ import com.songoda.core.compatibility.CompatibleHand;
import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.MethodMapping;
import com.songoda.core.compatibility.ServerVersion;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -1,7 +1,7 @@
package com.songoda.core.nms.world;
import com.songoda.core.compatibility.CompatibleMaterial;
import org.apache.commons.lang.WordUtils;
import org.apache.commons.text.WordUtils;
import org.bukkit.Location;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -19,7 +19,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -60,7 +60,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -60,7 +60,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<relativePath>../../pom.xml</relativePath>
</parent>

14
pom.xml
View File

@ -6,7 +6,7 @@
<groupId>com.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>2.6.13-DEV</version>
<version>2.6.13</version>
<packaging>pom</packaging>
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z' to update version recursively -->
@ -151,6 +151,18 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>