Skip to content

Commit e4de48c

Browse files
author
Jan Kluka
committed
1.5
Added MineBlock interface to support different types of blocks - VanillaMineBlock and ItemsAdderMineBlock Updated SellRegion and BlockPalette to work with MineBlock instead of XMaterial
1 parent 0635ede commit e4de48c

12 files changed

Lines changed: 588 additions & 260 deletions

File tree

pom.xml

Lines changed: 131 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,141 @@
11
<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/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
44

5-
<groupId>dev.drawethree.xprison</groupId>
6-
<artifactId>X-PrisonAPI</artifactId>
7-
<version>1.5-SNAPSHOT</version>
8-
<packaging>jar</packaging>
5+
<groupId>dev.drawethree.xprison</groupId>
6+
<artifactId>X-PrisonAPI</artifactId>
7+
<version>1.5-SNAPSHOT</version>
8+
<packaging>jar</packaging>
99

10-
<name>X-PrisonAPI</name>
11-
<description>Official API for X-Prison plugin</description>
12-
<url>https://www.spigotmc.org/resources/86845/</url>
10+
<name>X-PrisonAPI</name>
11+
<description>Official API for X-Prison plugin</description>
12+
<url>https://www.spigotmc.org/resources/86845/</url>
1313

14-
<properties>
15-
<maven.compiler.source>17</maven.compiler.source>
16-
<maven.compiler.target>17</maven.compiler.target>
17-
<maven.compiler.release>17</maven.compiler.release>
18-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19-
</properties>
14+
<properties>
15+
<maven.compiler.source>17</maven.compiler.source>
16+
<maven.compiler.target>17</maven.compiler.target>
17+
<maven.compiler.release>17</maven.compiler.release>
18+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19+
</properties>
2020

21-
<repositories>
22-
<repository>
23-
<id>spigot-repo</id>
24-
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
25-
</repository>
26-
<repository>
27-
<id>codemc-repo</id>
28-
<url>https://repo.codemc.org/repository/maven-public/</url>
29-
</repository>
30-
<repository>
31-
<id>enginehub-maven</id>
32-
<url>https://maven.enginehub.org/repo/</url>
33-
</repository>
34-
<repository>
35-
<id>paper-repo</id>
36-
<url>https://repo.papermc.io/repository/maven-public/</url>
37-
</repository>
38-
<repository>
39-
<id>jitpack.io</id>
40-
<url>https://jitpack.io</url>
41-
</repository>
42-
</repositories>
21+
<repositories>
22+
<repository>
23+
<id>spigot-repo</id>
24+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
25+
</repository>
26+
<repository>
27+
<id>codemc-repo</id>
28+
<url>https://repo.codemc.org/repository/maven-public/</url>
29+
</repository>
30+
<repository>
31+
<id>enginehub-maven</id>
32+
<url>https://maven.enginehub.org/repo/</url>
33+
</repository>
34+
<repository>
35+
<id>paper-repo</id>
36+
<url>https://repo.papermc.io/repository/maven-public/</url>
37+
</repository>
38+
<repository>
39+
<id>jitpack.io</id>
40+
<url>https://jitpack.io</url>
41+
</repository>
42+
<repository>
43+
<id>matteodev</id>
44+
<url>https://maven.devs.beer/</url>
45+
</repository>
46+
</repositories>
4347

44-
<dependencies>
45-
<dependency>
46-
<groupId>org.spigotmc</groupId>
47-
<artifactId>spigot-api</artifactId>
48-
<version>1.13.2-R0.1-SNAPSHOT</version>
49-
<scope>provided</scope>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.jetbrains</groupId>
53-
<artifactId>annotations</artifactId>
54-
<version>24.1.0</version>
55-
<scope>provided</scope>
56-
</dependency>
57-
<dependency>
58-
<groupId>dev.dejvokep</groupId>
59-
<artifactId>boosted-yaml</artifactId>
60-
<version>1.3.4</version>
61-
<scope>provided</scope>
62-
</dependency>
63-
<dependency>
64-
<groupId>org.projectlombok</groupId>
65-
<artifactId>lombok</artifactId>
66-
<version>1.18.32</version>
67-
<scope>provided</scope>
68-
</dependency>
69-
<dependency>
70-
<groupId>org.codemc.worldguardwrapper</groupId>
71-
<artifactId>worldguardwrapper</artifactId>
72-
<version>1.2.1-SNAPSHOT</version>
73-
<scope>provided</scope>
74-
</dependency>
75-
<dependency>
76-
<groupId>me.lucko</groupId>
77-
<artifactId>helper</artifactId>
78-
<version>5.6.14</version>
79-
<scope>provided</scope>
80-
</dependency>
81-
<dependency>
82-
<groupId>com.github.cryptomorin</groupId>
83-
<artifactId>XSeries</artifactId>
84-
<version>13.3.1</version>
85-
<scope>provided</scope>
86-
</dependency>
87-
<dependency>
88-
<groupId>com.google.code.gson</groupId>
89-
<artifactId>gson</artifactId>
90-
<version>2.10.1</version>
91-
<scope>provided</scope>
92-
</dependency>
93-
<dependency>
94-
<groupId>net.objecthunter</groupId>
95-
<artifactId>exp4j</artifactId>
96-
<version>0.4.8</version>
97-
<scope>provided</scope>
98-
</dependency>
99-
</dependencies>
48+
<dependencies>
49+
<dependency>
50+
<groupId>org.spigotmc</groupId>
51+
<artifactId>spigot-api</artifactId>
52+
<version>1.13.2-R0.1-SNAPSHOT</version>
53+
<scope>provided</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.jetbrains</groupId>
57+
<artifactId>annotations</artifactId>
58+
<version>24.1.0</version>
59+
<scope>provided</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>dev.dejvokep</groupId>
63+
<artifactId>boosted-yaml</artifactId>
64+
<version>1.3.4</version>
65+
<scope>provided</scope>
66+
</dependency>
67+
<dependency>
68+
<groupId>org.projectlombok</groupId>
69+
<artifactId>lombok</artifactId>
70+
<version>1.18.32</version>
71+
<scope>provided</scope>
72+
</dependency>
73+
<dependency>
74+
<groupId>org.codemc.worldguardwrapper</groupId>
75+
<artifactId>worldguardwrapper</artifactId>
76+
<version>1.2.1-SNAPSHOT</version>
77+
<scope>provided</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>me.lucko</groupId>
81+
<artifactId>helper</artifactId>
82+
<version>5.6.14</version>
83+
<scope>provided</scope>
84+
</dependency>
85+
<dependency>
86+
<groupId>com.github.cryptomorin</groupId>
87+
<artifactId>XSeries</artifactId>
88+
<version>13.3.1</version>
89+
<scope>provided</scope>
90+
</dependency>
91+
<dependency>
92+
<groupId>com.google.code.gson</groupId>
93+
<artifactId>gson</artifactId>
94+
<version>2.10.1</version>
95+
<scope>provided</scope>
96+
</dependency>
97+
<dependency>
98+
<groupId>net.objecthunter</groupId>
99+
<artifactId>exp4j</artifactId>
100+
<version>0.4.8</version>
101+
<scope>provided</scope>
102+
</dependency>
103+
<dependency>
104+
<groupId>dev.lone</groupId>
105+
<artifactId>api-itemsadder</artifactId>
106+
<version>4.0.10</version>
107+
<scope>provided</scope>
108+
</dependency>
109+
</dependencies>
100110

101-
<build>
102-
<defaultGoal>clean install</defaultGoal>
103-
<finalName>X-PrisonAPI ${project.version}</finalName>
111+
<build>
112+
<defaultGoal>clean install</defaultGoal>
113+
<finalName>X-PrisonAPI ${project.version}</finalName>
104114

105-
<sourceDirectory>src/main/java</sourceDirectory>
106-
<resources>
107-
<resource>
108-
<directory>src/main/resources</directory>
109-
<filtering>true</filtering>
110-
</resource>
111-
</resources>
112-
<testSourceDirectory>src/test/java</testSourceDirectory>
113-
<testResources>
114-
<testResource>
115-
<directory>src/test/resources</directory>
116-
</testResource>
117-
</testResources>
115+
<sourceDirectory>src/main/java</sourceDirectory>
116+
<resources>
117+
<resource>
118+
<directory>src/main/resources</directory>
119+
<filtering>true</filtering>
120+
</resource>
121+
</resources>
122+
<testSourceDirectory>src/test/java</testSourceDirectory>
123+
<testResources>
124+
<testResource>
125+
<directory>src/test/resources</directory>
126+
</testResource>
127+
</testResources>
118128

119-
<plugins>
120-
<plugin>
121-
<groupId>org.apache.maven.plugins</groupId>
122-
<artifactId>maven-compiler-plugin</artifactId>
123-
<version>3.11.0</version>
124-
<configuration>
125-
<source>17</source>
126-
<target>17</target>
127-
</configuration>
128-
</plugin>
129-
</plugins>
130-
</build>
129+
<plugins>
130+
<plugin>
131+
<groupId>org.apache.maven.plugins</groupId>
132+
<artifactId>maven-compiler-plugin</artifactId>
133+
<version>3.11.0</version>
134+
<configuration>
135+
<source>17</source>
136+
<target>17</target>
137+
</configuration>
138+
</plugin>
139+
</plugins>
140+
</build>
131141
</project>

src/main/java/dev/drawethree/xprison/api/XPrisonAPI.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import dev.drawethree.xprison.api.autominer.XPrisonAutoMinerAPI;
44
import dev.drawethree.xprison.api.autosell.XPrisonAutoSellAPI;
5+
import dev.drawethree.xprison.api.blocks.XPrisonBlocksAPI;
56
import dev.drawethree.xprison.api.bombs.XPrisonBombsAPI;
67
import dev.drawethree.xprison.api.currency.XPrisonCurrencyAPI;
78
import dev.drawethree.xprison.api.enchants.XPrisonEnchantsAPI;
@@ -142,6 +143,14 @@ public interface XPrisonAPI {
142143
@NotNull
143144
XPrisonRebirthAPI getRebirthApi();
144145

146+
/**
147+
* Gets the Blocks API
148+
*
149+
* @return the Blocks API instance
150+
*/
151+
@NotNull
152+
XPrisonBlocksAPI getBlocksApi();
153+
145154
/**
146155
* Gets the singleton instance of the XPrisonAPI.
147156
*

0 commit comments

Comments
 (0)