Skip to content

Commit 37ec954

Browse files
committed
fix: plugin not compiling
1 parent 061ef54 commit 37ec954

5 files changed

Lines changed: 27 additions & 21 deletions

File tree

pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@
9696
</build>
9797

9898
<repositories>
99-
<repository>
100-
<id>paper-repo</id>
101-
<url>https://repo.papermc.io/repository/maven-public/</url>
102-
</repository>
10399
<repository>
104100
<id>placeholderapi</id>
105101
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
@@ -118,20 +114,24 @@
118114
<layout>default</layout>
119115
</repository>
120116
<repository>
121-
<id>devmart-other</id>
122-
<url>https://nexuslite.gcnt.net/repos/other/</url>
117+
<id>paper-repo</id>
118+
<url>https://repo.papermc.io/repository/maven-public/</url>
123119
</repository>
124120
<repository>
125121
<id>sonatype-oss-snapshots1</id>
126122
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
127123
</repository>
124+
<repository>
125+
<id>MavenRepo</id>
126+
<url>https://repo.maven.apache.org/maven2/</url>
127+
</repository>
128128
</repositories>
129129

130130
<dependencies>
131131
<dependency>
132132
<groupId>io.papermc.paper</groupId>
133133
<artifactId>paper-api</artifactId>
134-
<version>1.20.4-R0.1-SNAPSHOT</version>
134+
<version>1.21-R0.1-SNAPSHOT</version>
135135
<scope>provided</scope>
136136
</dependency>
137137
<dependency>
@@ -237,9 +237,9 @@
237237
<scope>provided</scope>
238238
</dependency>
239239
<dependency>
240-
<groupId>com.tcoded</groupId>
240+
<groupId>com.github.technicallycoded</groupId>
241241
<artifactId>FoliaLib</artifactId>
242-
<version>0.4.2</version>
242+
<version>main-SNAPSHOT</version>
243243
<scope>compile</scope>
244244
</dependency>
245245
<dependency>

src/main/java/me/refracdevelopment/simplegems/SimpleGems.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ else if (Objects.requireNonNull(dataType) == DataType.SQLITE)
127127
getSqLiteManager().shutdown();
128128

129129
getFoliaLib().getScheduler().cancelAllTasks();
130-
} catch (Throwable ignored) {
130+
} catch (Exception ignored) {
131131
}
132132
}
133133

src/main/java/me/refracdevelopment/simplegems/menu/GemShopItem.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import ca.tweetzy.skulls.Skulls;
44
import ca.tweetzy.skulls.api.interfaces.Skull;
55
import com.cryptomorin.xseries.XEnchantment;
6-
import com.cryptomorin.xseries.reflection.XReflection;
6+
import com.cryptomorin.xseries.XItemFlag;
77
import dev.lone.itemsadder.api.CustomStack;
88
import lombok.Data;
99
import me.arcaniax.hdb.api.HeadDatabaseAPI;
@@ -137,7 +137,7 @@ public void runActions(Player player) {
137137
}
138138

139139
public ItemStack getItem(Player player) {
140-
ItemBuilder item = new ItemBuilder(Methods.getMaterial(getMaterial()).parseMaterial(), getAmount());
140+
ItemBuilder item = new ItemBuilder(Methods.getMaterial(getMaterial()).get(), getAmount());
141141

142142
if (isHeadDatabase()) {
143143
HeadDatabaseAPI api = new HeadDatabaseAPI();
@@ -159,7 +159,7 @@ public ItemStack getItem(Player player) {
159159
ItemBuilder finalItem = item;
160160

161161
if (isGlow()) {
162-
finalItem.addEnchant(XEnchantment.POWER.getEnchant(), 1);
162+
finalItem.addEnchant(XEnchantment.POWER.get(), 1);
163163
finalItem.setItemFlags(ItemFlag.HIDE_ENCHANTS);
164164
}
165165

@@ -173,10 +173,8 @@ public ItemStack getItem(Player player) {
173173
if (!isSkulls() && !isHeadDatabase())
174174
finalItem.setSkullOwner(getSkullOwner());
175175

176-
if (XReflection.supports(18))
177-
finalItem.setItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
178-
else if (XReflection.supports(19))
179-
finalItem.setItemFlags(ItemFlag.HIDE_ITEM_SPECIFICS);
176+
// Hide Potion Effects from lore
177+
finalItem.setItemFlags(XItemFlag.HIDE_ADDITIONAL_TOOLTIP.get());
180178

181179
return finalItem.toItemStack();
182180
}

src/main/java/me/refracdevelopment/simplegems/utilities/ItemBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ public ItemBuilder(ItemStack is) {
3030
}
3131

3232
public ItemBuilder(Material m, int amount) {
33-
is = new ItemStack(Objects.requireNonNull(XMaterial.matchXMaterial(m).parseMaterial()), amount);
33+
is = new ItemStack(Objects.requireNonNull(XMaterial.matchXMaterial(m).get()), amount);
3434
}
3535

3636
public ItemBuilder(Material m, int amount, byte durability) {
37-
is = new ItemStack(Objects.requireNonNull(XMaterial.matchXMaterial(m).parseMaterial()), amount, durability);
37+
is = new ItemStack(Objects.requireNonNull(XMaterial.matchXMaterial(m).get()), amount, durability);
3838
}
3939

4040
public ItemBuilder clone() {

src/main/java/me/refracdevelopment/simplegems/utilities/chat/RyMessageUtils.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@
1919
import java.util.regex.Pattern;
2020
import java.util.stream.Collectors;
2121

22+
/*
23+
* This software and its content is copyright of RyanMoodGAMING - © RyanMoodGAMING 2023. All rights reserved.
24+
* Any redistribution or reproduction of part or all of the contents in any form is prohibited other than the following:
25+
* you may print or download to a local hard disk extracts for your personal and non-commercial use only
26+
* you may copy the content to individual third parties for their personal use, but only if you acknowledge the website as the source of the material
27+
* You may not, except with our express written permission, distribute or commercially exploit the content. Nor may you transmit it or store it in any other website or other form of electronic retrieval system.
28+
*/
29+
2230
/**
2331
* Modified version of <a href="https://github.com/RyanMoodGAMING/RyUtils">RyMessageUtils</a>
2432
*
25-
* @Author: RyanMoodGAMING (https://github.com/RyanMoodGAMING/RyUtils)
33+
* @author <a href="https://github.com/RyanMoodGAMING/">RyanMoodGAMING</a>
2634
*/
2735
@SuppressWarnings("unused")
2836
public class RyMessageUtils {
@@ -155,7 +163,7 @@ public static Component adventureTranslate(String message) {
155163
*
156164
* @param input The string that needs translating.
157165
* @return String which is in an adventure format.
158-
* @Author: EternalCodeTeam (https://github.com/EternalCodeTeam/ChatFormatter/)
166+
* @author EternalCodeTeam (https://github.com/EternalCodeTeam/ChatFormatter/)
159167
*/
160168
private static String legacyToAdventure(String input) {
161169
String result = HEX_PATTERN.matcher(input).replaceAll(matchResult -> {

0 commit comments

Comments
 (0)