Skip to content

Commit c29339a

Browse files
committed
Started work on updating
1 parent 74add11 commit c29339a

11 files changed

+84
-186
lines changed

.classpath

-49
This file was deleted.

.project

-34
This file was deleted.

.settings/org.eclipse.core.resources.prefs

-4
This file was deleted.

.settings/org.eclipse.jdt.apt.core.prefs

-2
This file was deleted.

.settings/org.eclipse.jdt.core.prefs

-9
This file was deleted.

.settings/org.eclipse.m2e.core.prefs

-4
This file was deleted.

pom.xml

+63-59
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,64 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2-
<modelVersion>4.0.0</modelVersion>
3-
<groupId>solarrabbit</groupId>
4-
<artifactId>ColorBundles</artifactId>
5-
<version>1.8</version>
6-
<properties>
7-
<maven.compiler.source>16</maven.compiler.source>
8-
<maven.compiler.target>16</maven.compiler.target>
9-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<junit.version>5.6.0</junit.version>
11-
</properties>
12-
<repositories>
13-
<repository>
14-
<id>spigot-repo</id>
15-
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
16-
</repository>
17-
<repository>
18-
<id>jitpack-repo</id>
19-
<url>https://jitpack.io</url>
20-
</repository>
21-
</repositories>
22-
<dependencies>
23-
<dependency>
24-
<groupId>org.spigotmc</groupId>
25-
<artifactId>spigot-api</artifactId>
26-
<version>1.18-R0.1-SNAPSHOT</version>
27-
<scope>provided</scope>
28-
</dependency>
29-
<dependency>
30-
<groupId>com.github.LoneDev6</groupId>
31-
<artifactId>api-itemsadder</artifactId>
32-
<version>2.3.8</version>
33-
<scope>provided</scope>
34-
</dependency>
35-
<dependency>
36-
<groupId>org.junit.jupiter</groupId>
37-
<artifactId>junit-jupiter-api</artifactId>
38-
<version>${junit.version}</version>
39-
<scope>test</scope>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.junit.jupiter</groupId>
43-
<artifactId>junit-jupiter-engine</artifactId>
44-
<version>${junit.version}</version>
45-
<scope>test</scope>
46-
</dependency>
47-
</dependencies>
48-
<build>
49-
<finalName>${project.name}</finalName>
50-
<resources>
51-
<resource>
52-
<directory>${project.basedir}/resources</directory>
53-
<filtering>true</filtering>
54-
<includes>
55-
<include>**/*.yml</include>
56-
</includes>
57-
</resource>
58-
</resources>
59-
</build>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>solarrabbit</groupId>
5+
<artifactId>ColorBundles</artifactId>
6+
<version>1.8</version>
7+
8+
<properties>
9+
<maven.compiler.source>17</maven.compiler.source>
10+
<maven.compiler.target>17</maven.compiler.target>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
<junit.version>5.9.0</junit.version>
13+
</properties>
14+
15+
<repositories>
16+
<repository>
17+
<id>spigot-repo</id>
18+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
19+
</repository>
20+
<repository>
21+
<id>jitpack-repo</id>
22+
<url>https://jitpack.io</url>
23+
</repository>
24+
</repositories>
25+
26+
<dependencies>
27+
<dependency>
28+
<groupId>org.spigotmc</groupId>
29+
<artifactId>spigot-api</artifactId>
30+
<version>1.19.3-R0.1-SNAPSHOT</version>
31+
<scope>provided</scope>
32+
</dependency>
33+
<dependency>
34+
<groupId>com.github.LoneDev6</groupId>
35+
<artifactId>api-itemsadder</artifactId>
36+
<version>3.2.5</version>
37+
<scope>provided</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.junit.jupiter</groupId>
41+
<artifactId>junit-jupiter-api</artifactId>
42+
<version>${junit.version}</version>
43+
<scope>test</scope>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.junit.jupiter</groupId>
47+
<artifactId>junit-jupiter-engine</artifactId>
48+
<version>${junit.version}</version>
49+
<scope>test</scope>
50+
</dependency>
51+
</dependencies>
52+
<build>
53+
<finalName>${project.name}</finalName>
54+
<resources>
55+
<resource>
56+
<directory>src/main/resources</directory>
57+
<filtering>true</filtering>
58+
<includes>
59+
<include>**/*.yml</include>
60+
</includes>
61+
</resource>
62+
</resources>
63+
</build>
6064
</project>

src/main/java/com/solarrabbit/colorbundles/ColorBundles.java

+10-14
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,16 @@ public void onEnable() {
6262
console.sendMessage(
6363
ChatColor.GOLD + "[ColorBundles] " + pluginName
6464
+ " cannot be found! Using default loader instead...");
65-
else
66-
switch (pluginName) {
67-
case "ItemsAdder":
68-
console.sendMessage(
69-
ChatColor.AQUA + "[ColorBundles] " + pluginName
70-
+ " detected! Waiting for ItemsAdder to load items...");
71-
loader = new ItemsAdderCustomRecipeLoader(this);
72-
break;
73-
default:
74-
console.sendMessage(
75-
ChatColor.AQUA + "[ColorBundles] " + pluginName
76-
+ " is not supported! Using default loader instead...");
77-
break;
78-
}
65+
else if ("ItemsAdder".equals(pluginName)) {
66+
console.sendMessage(
67+
ChatColor.AQUA + "[ColorBundles] " + pluginName
68+
+ " detected! Waiting for ItemsAdder to load items...");
69+
loader = new ItemsAdderCustomRecipeLoader(this);
70+
} else {
71+
console.sendMessage(
72+
ChatColor.AQUA + "[ColorBundles] " + pluginName
73+
+ " is not supported! Using default loader instead...");
74+
}
7975
}
8076

8177
loader.loadRecipes();

src/main/java/com/solarrabbit/colorbundles/config/CustomBundleConfig.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -36,45 +36,45 @@ public class CustomBundleConfig {
3636
*/
3737
public static final String DEFAULT_NAME_KEY = "default-name";
3838
private final ConfigurationSection config;
39-
39+
4040
public CustomBundleConfig(ConfigurationSection config) {
4141
this.config = config;
4242
}
43-
43+
4444
public ItemStack getBundle() {
4545
ItemStack item = new ItemStack(Material.BUNDLE);
4646
ItemMeta meta = item.getItemMeta();
47-
47+
4848
int modelData = this.getCustomModelData();
4949
if (modelData != 0)
5050
meta.setCustomModelData(modelData);
51-
51+
5252
String name = this.getName();
5353
if (name != null)
5454
meta.setDisplayName(
55-
ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', name));
56-
55+
ChatColor.WHITE + ChatColor.translateAlternateColorCodes('&', name));
56+
5757
PersistentDataContainer prc = meta.getPersistentDataContainer();
5858
NamespacedKey nsk = new NamespacedKey(JavaPlugin.getPlugin(ColorBundles.class), DEFAULT_NAME_KEY);
5959
prc.set(nsk, PersistentDataType.STRING, name);
60-
60+
6161
item.setItemMeta(meta);
6262
return item;
6363
}
64-
64+
6565
public Material getDye() {
6666
String materialName = this.config.getString("dye", null);
6767
return materialName == null ? null : Material.matchMaterial(materialName);
6868
}
69-
69+
7070
public String getKey() {
7171
return config.getName();
7272
}
73-
73+
7474
private String getName() {
7575
return this.config.getString("name", null);
7676
}
77-
77+
7878
/**
7979
* Returns the model data set for this model in the configurations, or
8080
* {@code 0} if it is not set.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)