mirror of
https://github.com/LordBoos/boosCooldowns.git
synced 2024-11-01 00:10:02 +01:00
Update for 1.10
This commit is contained in:
parent
01c0ac0ac4
commit
b6f2d665bd
@ -56,6 +56,12 @@
|
||||
<version>${boosCooldowns.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cz.boosik</groupId>
|
||||
<artifactId>NMS_hook_1_10_R1</artifactId>
|
||||
<version>${boosCooldowns.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -32,13 +32,15 @@ public class NMS {
|
||||
if (version.equals("v1_9_R1")) {
|
||||
hook = new NMSHook_v1_9_R1();
|
||||
} else if (version.equals("v1_9_R2")) {
|
||||
hook = new NMSHook_v1_9_R2();
|
||||
hook = new NMSHook_v1_10_R1();
|
||||
} else if (version.equals("v1_8_R3")) {
|
||||
hook = new NMSHook_v1_8_R3();
|
||||
} else if (version.equals("v1_8_R2")) {
|
||||
hook = new NMSHook_v1_8_R2();
|
||||
} else if (version.equals("v1_8_R1")) {
|
||||
hook = new NMSHook_v1_8_R1();
|
||||
} else if (version.equals("v1_10_R1")) {
|
||||
hook = new NMSHook_v1_10_R1();
|
||||
}
|
||||
|
||||
compatible = hook != null;
|
||||
|
25
nms/NMS_hook_1_10_R1/pom.xml
Normal file
25
nms/NMS_hook_1_10_R1/pom.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>boosCooldowns</artifactId>
|
||||
<groupId>cz.boosik</groupId>
|
||||
<version>${boosCooldowns.version}</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>NMS_hook_1_10_R1</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!--Spigot API-->
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.10-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
28
nms/NMS_hook_1_10_R1/src/main/java/nms/NMSHook.java
Normal file
28
nms/NMS_hook_1_10_R1/src/main/java/nms/NMSHook.java
Normal file
@ -0,0 +1,28 @@
|
||||
package nms;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
/**
|
||||
* All rights reserved.
|
||||
*
|
||||
* @author ColoredCarrot
|
||||
*/
|
||||
public interface NMSHook {
|
||||
|
||||
/**
|
||||
* Sends a JSON message to a player.
|
||||
*
|
||||
* @param json (String) - the plain JSON
|
||||
* @param player (Player) - the player
|
||||
*/
|
||||
public void sendJSON(String json, Player player);
|
||||
|
||||
/**
|
||||
* Sends an actionbar to a player.
|
||||
*
|
||||
* @param json (String) - the plain JSON
|
||||
* @param player (Player) - the player
|
||||
*/
|
||||
public void sendActionBar(String json, Player player);
|
||||
|
||||
}
|
29
nms/NMS_hook_1_10_R1/src/main/java/nms/NMSHook_v1_10_R1.java
Normal file
29
nms/NMS_hook_1_10_R1/src/main/java/nms/NMSHook_v1_10_R1.java
Normal file
@ -0,0 +1,29 @@
|
||||
package nms;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import net.minecraft.server.v1_10_R1.IChatBaseComponent.ChatSerializer;
|
||||
import net.minecraft.server.v1_10_R1.PacketPlayOutChat;
|
||||
|
||||
/**
|
||||
* All rights reserved.
|
||||
*
|
||||
* @author ColoredCarrot
|
||||
*/
|
||||
public class NMSHook_v1_10_R1
|
||||
implements NMSHook {
|
||||
|
||||
public void sendJSON(String json, Player player) {
|
||||
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(new PacketPlayOutChat(ChatSerializer.a(json)));
|
||||
|
||||
}
|
||||
|
||||
public void sendActionBar(String json, Player player) {
|
||||
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(new PacketPlayOutChat(ChatSerializer.a(json), (byte) 2));
|
||||
|
||||
}
|
||||
|
||||
}
|
7
pom.xml
7
pom.xml
@ -10,6 +10,7 @@
|
||||
<module>nms/NMS_hook_1_8_R3</module>
|
||||
<module>nms/NMS_hook_1_9_R1</module>
|
||||
<module>nms/NMS_hook_1_9_R2</module>
|
||||
<module>nms/NMS_hook_1_10_R1</module>
|
||||
<module>nms/NMS</module>
|
||||
<module>plugin</module>
|
||||
<module>jar</module>
|
||||
@ -17,12 +18,12 @@
|
||||
<packaging>pom</packaging>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
<boosCooldowns.version>3.11.1</boosCooldowns.version>
|
||||
<boosCooldowns.version>3.11.2</boosCooldowns.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<minecraft.version>1.9.2</minecraft.version>
|
||||
<minecraft.version>1.10</minecraft.version>
|
||||
<bukkit.version>R0.1</bukkit.version>
|
||||
<bukkit.packet>v1_9_R1</bukkit.packet>
|
||||
<bukkit.packet>v1_10_R1</bukkit.packet>
|
||||
</properties>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
|
Loading…
Reference in New Issue
Block a user