Update for 1.9.4

This commit is contained in:
Jakub Kolář 2016-05-16 15:05:25 +02:00
parent 2ce8337ed5
commit 01c0ac0ac4
8 changed files with 119 additions and 22 deletions

View File

@ -16,37 +16,43 @@
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_8_R3</artifactId>
<version>3.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_9_R1</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_8_R1</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_8_R2</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_9_R1</artifactId>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_9_R2</artifactId>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>plugin</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -29,25 +29,31 @@
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_8_R3</artifactId>
<version>3.11.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_9_R1</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_8_R1</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_8_R2</artifactId>
<version>3.11.0</version>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_9_R1</artifactId>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>cz.boosik</groupId>
<artifactId>NMS_hook_1_9_R2</artifactId>
<version>${boosCooldowns.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -31,6 +31,8 @@ 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();
} else if (version.equals("v1_8_R3")) {
hook = new NMSHook_v1_8_R3();
} else if (version.equals("v1_8_R2")) {

View 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>
<relativePath>../../pom.xml</relativePath>
<version>${boosCooldowns.version}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>NMS_hook_1_9_R2</artifactId>
<dependencies>
<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.9.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View 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);
}

View File

@ -0,0 +1,29 @@
package nms;
import org.bukkit.craftbukkit.v1_9_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_9_R2.IChatBaseComponent.ChatSerializer;
import net.minecraft.server.v1_9_R2.PacketPlayOutChat;
/**
* All rights reserved.
*
* @author ColoredCarrot
*/
public class NMSHook_v1_9_R2
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));
}
}

View File

@ -1,6 +1,6 @@
name: boosCooldowns
main: cz.boosik.boosCooldown.BoosCoolDown
version: 3.11.0
version: 3.11.1
authors: [LordBoos (boosik)]
softdepend: [Vault]
description: >

View File

@ -9,6 +9,7 @@
<module>nms/NMS_hook_1_8_R2</module>
<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</module>
<module>plugin</module>
<module>jar</module>
@ -16,7 +17,7 @@
<packaging>pom</packaging>
<url>http://maven.apache.org</url>
<properties>
<boosCooldowns.version>3.11.0</boosCooldowns.version>
<boosCooldowns.version>3.11.1</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>