Explorar el Código

update for mc 1.16.4

MasterCake hace 4 años
padre
commit
0ea290dc33

+ 1 - 0
pom.xml

@@ -32,6 +32,7 @@
         <module>v1_15_R1</module>
         <module>v1_16_R1</module>
         <module>v1_16_R2</module>
+        <module>v1_16_R3</module>
     </modules>
 
     <repositories>

+ 35 - 0
v1_16_R3/pom.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>de.Linus122.TimeIsMoney</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.9.6.17</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <name>TimeIsMoney v1_16_R3</name>
+    <packaging>jar</packaging>
+    <artifactId>v1_16_R3</artifactId>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.spigotmc</groupId>
+            <artifactId>spigot</artifactId>
+            <version>1.16.4-R0.1-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>de.Linus122.TimeIsMoney</groupId>
+            <artifactId>Tools</artifactId>
+            <version>1.9.6.17</version>
+        </dependency>
+    </dependencies>
+</project>

+ 30 - 0
v1_16_R3/src/main/java/de/Linus122/TimeIsMoney/version/v1_16_R3/NBTUtils.java

@@ -0,0 +1,30 @@
+package de.Linus122.TimeIsMoney.version.v1_16_R3;
+
+import de.Linus122.TimeIsMoney.tools.ActionBarUtils;
+import net.minecraft.server.v1_16_R3.ChatMessageType;
+import net.minecraft.server.v1_16_R3.IChatBaseComponent;
+import net.minecraft.server.v1_16_R3.PacketPlayOutChat;
+import org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer;
+import org.bukkit.entity.Player;
+
+import static de.Linus122.TimeIsMoney.tools.Utils.CC;
+
+import java.util.UUID;
+
+/**
+ * NBT Utils for v1_16_R3.
+ *
+ * @author Linus122
+ * @since 1.9.6.18
+ */
+public class NBTUtils implements ActionBarUtils {
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public void sendActionBarMessage(Player p, String message) {
+		IChatBaseComponent icbc = IChatBaseComponent.ChatSerializer.a("{\"text\": \"" + CC(message) + "\"}");
+		PacketPlayOutChat bar = new PacketPlayOutChat(icbc, ChatMessageType.GAME_INFO, UUID.randomUUID());
+		((CraftPlayer) p).getHandle().playerConnection.sendPacket(bar);
+	}
+}