Skip to content

Commit bb1ae34

Browse files
committed
Add Velocity to the API
1 parent 18a53c8 commit bb1ae34

File tree

5 files changed

+60
-9
lines changed

5 files changed

+60
-9
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ target/
44
!**/src/test/**/target/
55

66
### IntelliJ IDEA ###
7-
.idea/modules.xml
8-
.idea/jarRepositories.xml
9-
.idea/compiler.xml
7+
.idea/*.xml
108
.idea/libraries/
119
*.iws
1210
*.iml

.idea/discord.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pom.xml

+20-2
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,18 @@
6363
<id>bungeecord-repo</id>
6464
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
6565
</repository>
66+
<repository>
67+
<!--> Velocity <-->
68+
<id>papermc</id>
69+
<url>https://repo.papermc.io/repository/maven-public/</url>
70+
</repository>
6671
</repositories>
6772

6873
<dependencies>
6974
<dependency>
7075
<groupId>org.spigotmc</groupId>
7176
<artifactId>spigot-api</artifactId>
72-
<version>1.20-R0.1-SNAPSHOT</version>
77+
<version>1.20.4-R0.1-SNAPSHOT</version>
7378
<scope>provided</scope>
7479
</dependency>
7580
<dependency>
@@ -81,7 +86,20 @@
8186
<dependency>
8287
<groupId>net.pandorianmc</groupId>
8388
<artifactId>PandorCore</artifactId>
84-
<version>0.6.6</version>
89+
<version>1.0.0</version>
90+
</dependency>
91+
<dependency>
92+
<!--> Velocity <-->
93+
<groupId>com.velocitypowered</groupId>
94+
<artifactId>velocity-api</artifactId>
95+
<version>3.3.0-SNAPSHOT</version>
96+
<scope>provided</scope>
97+
</dependency>
98+
<dependency>
99+
<groupId>org.projectlombok</groupId>
100+
<artifactId>lombok</artifactId>
101+
<version>1.18.30</version>
102+
<scope>provided</scope>
85103
</dependency>
86104
</dependencies>
87105

src/main/java/net/pandorianmc/bungee/api/PandorCoreAPI.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.pandorianmc.bungee.api;
22

3+
import lombok.SneakyThrows;
34
import net.pandorianmc.bungee.data.PandorianProxyPlayer;
4-
import org.bukkit.plugin.IllegalPluginAccessException;
55

66
import java.util.UUID;
77

@@ -16,16 +16,18 @@ public class PandorCoreAPI {
1616
/**
1717
* @return Is the PandorCoreAPI enabled and registered?
1818
*/
19+
@SneakyThrows
1920
public static boolean isRegistered() {
20-
throw new IllegalPluginAccessException("PandorCoreAPI is not registered!");
21+
throw new Exception("PandorCoreAPI is not registered!");
2122
}
2223

2324
/**
2425
* The #getPlayerData method allows you to access player data
2526
*
2627
* @return player's profile.
2728
*/
29+
@SneakyThrows
2830
public PandorianProxyPlayer getPlayerData(UUID player) {
29-
throw new IllegalPluginAccessException("PandorCoreAPI is not registered!");
31+
throw new Exception("PandorCoreAPI is not registered!");
3032
}
3133
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package net.pandorianmc.velocity.api;
2+
3+
import lombok.SneakyThrows;
4+
import net.pandorianmc.velocity.data.PandorianProxyPlayer;
5+
6+
import java.util.UUID;
7+
8+
/**
9+
* The PandorCoreAPI allows you to hook into PandorCore to either modify and grab data
10+
* or to add new features and events. Questions? https://discord.pandorianmc.net/
11+
*/
12+
public class PandorCoreAPI {
13+
14+
public static net.pandorianmc.bungee.api.PandorCoreAPI INSTANCE;
15+
16+
/**
17+
* @return Is the PandorCoreAPI enabled and registered?
18+
*/
19+
@SneakyThrows
20+
public static boolean isRegistered() {
21+
throw new Exception("PandorCoreAPI is not registered!");
22+
}
23+
24+
/**
25+
* The #getPlayerData method allows you to access player data
26+
*
27+
* @return player's profile.
28+
*/
29+
@SneakyThrows
30+
public PandorianProxyPlayer getPlayerData(UUID player) {
31+
throw new Exception("PandorCoreAPI is not registered!");
32+
}
33+
}

0 commit comments

Comments
 (0)