Skip to content

Commit 244f911

Browse files
Fixed item names and re-added the somehow reverted code.
1 parent d7958d9 commit 244f911

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

pom.xml

+9-4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
</build>
5656

5757
<repositories>
58+
<repository>
59+
<id>placeholderapi</id>
60+
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
61+
</repository>
5862
<repository>
5963
<id>spigotmc-repo</id>
6064
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
@@ -67,10 +71,6 @@
6771
<id>sonatype</id>
6872
<url>https://oss.sonatype.org/content/groups/public/</url>
6973
</repository>
70-
<repository>
71-
<id>placeholderapi</id>
72-
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
73-
</repository>
7474
<repository>
7575
<id>localrepository</id>
7676
<url>file://${project.basedir}/lib</url>
@@ -108,5 +108,10 @@
108108
<scope>system</scope>
109109
<systemPath>${project.basedir}/lib/Skulls-2.4.1.jar</systemPath>
110110
</dependency>
111+
<dependency>
112+
<groupId>com.github.cryptomorin</groupId>
113+
<artifactId>XSeries</artifactId>
114+
<version>8.7.1</version>
115+
</dependency>
111116
</dependencies>
112117
</project>

src/main/java/net/bghddevelopment/punishmentgui/utils/ItemBuilder.java

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package net.bghddevelopment.punishmentgui.utils;
22

3+
import com.cryptomorin.xseries.XMaterial;
4+
import org.bukkit.Bukkit;
35
import org.bukkit.ChatColor;
46
import org.bukkit.DyeColor;
57
import org.bukkit.Material;
@@ -26,11 +28,19 @@ public ItemBuilder(ItemStack is) {
2628
}
2729

2830
public ItemBuilder(Material m, int amount) {
29-
is = new ItemStack(m, amount);
31+
if (Bukkit.getVersion().contains("1.7")) {
32+
is = new ItemStack(m, amount);
33+
} else {
34+
this.is = new ItemStack(XMaterial.matchXMaterial(m).parseMaterial(), amount);
35+
}
3036
}
3137

3238
public ItemBuilder(Material m, int amount, byte durability) {
33-
is = new ItemStack(m, amount, durability);
39+
if (Bukkit.getVersion().contains("1.7")) {
40+
is = new ItemStack(m, amount, durability);
41+
} else {
42+
this.is = new ItemStack(XMaterial.matchXMaterial(m).parseMaterial(), amount, (short) durability);
43+
}
3444
}
3545

3646
public ItemBuilder clone() {

src/main/resources/plugin.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: PunishGUI
2-
version: 1.1.1
2+
version: 1.1.2
33
main: net.bghddevelopment.punishmentgui.PunishGUI
4-
authors: [BGHDDevelopment LLC]
4+
authors: [BGHDDevelopmentLLC]
5+
api-version: 1.13
56
softdepend:
67
- PlaceholderAPI
78
- HeadDatabase

0 commit comments

Comments
 (0)