Skip to content

Commit 499fcc2

Browse files
committed
Add 1.14 support! Update version to 1.1.3
1 parent 50b6fdd commit 499fcc2

File tree

6 files changed

+33
-25
lines changed

6 files changed

+33
-25
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Scoreboard API for your Minecraft Sponge and Bukkit Plugins.
44
**You can use this as a Plugin, or just add it to your dependencies.**
55

66
## Features:
7-
- Works for all the **Bukkit** versions since **1.7** (even **1.13**!).
7+
- Works for all the **Bukkit** versions since **1.7** (even **1.14**!).
88
- Works with **Sponge**! (Tell me if a version is not compatible)
99
- No blinking!
1010
- Max characters per line:
@@ -70,10 +70,10 @@ repositories {
7070
}
7171
7272
dependencies {
73-
compile 'fr.minuskube:netherboard-bukkit:1.1.2'
73+
compile 'fr.minuskube:netherboard-bukkit:1.1.3'
7474
7575
// Or if you use Sponge:
76-
// compile 'fr.minuskube:netherboard-sponge:1.1.2'
76+
// compile 'fr.minuskube:netherboard-sponge:1.1.3'
7777
}
7878
```
7979

@@ -89,7 +89,7 @@ dependencies {
8989
<artifactId>netherboard-sponge</artifactId>
9090
-->
9191

92-
<version>1.1.2</version>
92+
<version>1.1.3</version>
9393
</dependency>
9494
```
9595

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ subprojects {
1111
sourceCompatibility = '1.8'
1212

1313
group 'fr.minuskube'
14-
version '1.1.2'
14+
version '1.1.3'
1515

1616
configurations { provided }
1717

bukkit/src/main/java/fr/minuskube/netherboard/bukkit/BPlayerBoard.java

+17-13
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,11 @@ private void sendScore(Objective obj, String name, int score, boolean remove) {
196196
break;
197197
}
198198

199-
case "1.13": {
200-
Object packet = NMS.PACKET_SCORE.newInstance(
201-
remove ? NMS.ENUM_SCORE_ACTION_REMOVE : NMS.ENUM_SCORE_ACTION_CHANGE,
202-
obj.getName(),
203-
name,
204-
score
205-
);
206-
207-
NMS.sendPacket(packet, player);
208-
break;
209-
}
210-
211-
default: {
199+
case "1.8":
200+
case "1.9":
201+
case "1.10":
202+
case "1.11":
203+
case "1.12": {
212204
Object packet;
213205

214206
if(remove) {
@@ -226,6 +218,18 @@ private void sendScore(Objective obj, String name, int score, boolean remove) {
226218
NMS.sendPacket(packet, player);
227219
break;
228220
}
221+
222+
default: {
223+
Object packet = NMS.PACKET_SCORE.newInstance(
224+
remove ? NMS.ENUM_SCORE_ACTION_REMOVE : NMS.ENUM_SCORE_ACTION_CHANGE,
225+
obj.getName(),
226+
name,
227+
score
228+
);
229+
230+
NMS.sendPacket(packet, player);
231+
break;
232+
}
229233
}
230234
} catch(InstantiationException | IllegalAccessException
231235
| InvocationTargetException | NoSuchMethodException e) {

bukkit/src/main/java/fr/minuskube/netherboard/bukkit/util/NMS.java

+9-5
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,21 @@ public class NMS {
8888
case "1.7":
8989
packetScore = packetScoreClass.getConstructor(scoreClass, int.class);
9090
break;
91-
case "1.13":
91+
case "1.8":
92+
case "1.9":
93+
case "1.10":
94+
case "1.11":
95+
case "1.12":
96+
packetScore = packetScoreClass.getConstructor(scoreClass);
97+
packetScoreRemove = packetScoreClass.getConstructor(String.class, objClass);
98+
break;
99+
default:
92100
packetScore = packetScoreClass.getConstructor(scoreActionClass,
93101
String.class, String.class, int.class);
94102

95103
enumScoreActionChange = scoreActionClass.getEnumConstants()[0];
96104
enumScoreActionRemove = scoreActionClass.getEnumConstants()[1];
97105
break;
98-
default:
99-
packetScore = packetScoreClass.getConstructor(scoreClass);
100-
packetScoreRemove = packetScoreClass.getConstructor(String.class, objClass);
101-
break;
102106
}
103107

104108
packetDisplay = packetDisplayClass.getConstructor(int.class, objClass);

bukkit/src/main/resources/plugin.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Netherboard
2-
version: 1.1.2
2+
version: 1.1.3
33
description: Scoreboard API for your Bukkit Plugins.
44
author: MinusKube
55
website: https://github.com/MinusKube/netherboard

sponge/src/main/java/fr/minuskube/netherboard/sponge/NetherboardPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
description = "Scoreboard API for your Sponge Plugins.",
77
authors = "MinusKube",
88
url = "https://github.com/MinusKube/netherboard",
9-
version = "1.1.2")
9+
version = "1.1.3")
1010
public class NetherboardPlugin {}

0 commit comments

Comments
 (0)