diff --git a/pom.xml b/pom.xml
index edecbe9..788b1d5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.loving11ish
EpicHomes
- 1.0.8
+ 1.0.9
jar
EpicHomes
diff --git a/src/main/java/me/loving11ish/epichomes/EpicHomes.java b/src/main/java/me/loving11ish/epichomes/EpicHomes.java
index 7b803d7..e6919f2 100644
--- a/src/main/java/me/loving11ish/epichomes/EpicHomes.java
+++ b/src/main/java/me/loving11ish/epichomes/EpicHomes.java
@@ -89,7 +89,8 @@ public void onLoad() {
versionCheckerUtils.setVersion();
// Server version compatibility check
- if (versionCheckerUtils.getVersion() != 20 || !versionCheckerUtils.isVersionCheckedSuccessfully()) {
+ if (versionCheckerUtils.getVersion() < 16 || versionCheckerUtils.getVersion() > 21
+ || !versionCheckerUtils.isVersionCheckedSuccessfully()) {
MessageUtils.sendConsole("&4-------------------------------------------");
MessageUtils.sendConsole("&4Your server version is: &d" + Bukkit.getVersion());
MessageUtils.sendConsole("&4This plugin is only supported on the Minecraft versions listed below:");
@@ -98,6 +99,7 @@ public void onLoad() {
MessageUtils.sendConsole("&41.18.x");
MessageUtils.sendConsole("&41.19.x");
MessageUtils.sendConsole("&41.20.x");
+ MessageUtils.sendConsole("&41.21.x");
MessageUtils.sendConsole("&4Is now disabling!");
MessageUtils.sendConsole("&4-------------------------------------------");
Bukkit.getPluginManager().disablePlugin(this);
@@ -343,8 +345,12 @@ public static PlayerMenuUtility getPlayerMenuUtility(Player player) {
private void setVersion() {
String packageName = Bukkit.getServer().getClass().getPackage().getName();
String bukkitVersion = Bukkit.getServer().getBukkitVersion();
- if (bukkitVersion.contains("1.20.5") || bukkitVersion.contains("1.20.6")) {
- serverVersion = ServerVersion.v1_20_R4;
+ if (bukkitVersion.contains("1.20.5")) {
+ serverVersion = ServerVersion.v1_20_R5;
+ } else if (bukkitVersion.contains("1.20.6")) {
+ serverVersion = ServerVersion.v1_20_R5;
+ } else if (bukkitVersion.contains("1.21")) {
+ serverVersion = ServerVersion.v1_21_R1;
} else {
serverVersion = ServerVersion.valueOf(packageName.replace("org.bukkit.craftbukkit.", ""));
}
diff --git a/src/main/java/me/loving11ish/epichomes/versionsystems/ServerVersion.java b/src/main/java/me/loving11ish/epichomes/versionsystems/ServerVersion.java
index 5cf5ec7..9252884 100644
--- a/src/main/java/me/loving11ish/epichomes/versionsystems/ServerVersion.java
+++ b/src/main/java/me/loving11ish/epichomes/versionsystems/ServerVersion.java
@@ -26,7 +26,9 @@ public enum ServerVersion {
v1_20_R1,
v1_20_R2,
v1_20_R3,
- v1_20_R4;
+ v1_20_R4,
+ v1_20_R5,
+ v1_21_R1;
public boolean serverVersionEqual(ServerVersion version) {
return this.equals(version);