Skip to content

Commit

Permalink
Fix ArrayIndexOutOfBoundsException in 1.20.5+ (#45)
Browse files Browse the repository at this point in the history
* Fix ArrayIndexOutOfBoundsException in 1.20.6+

* Fix
  • Loading branch information
TenkyuChimata authored Aug 26, 2024
1 parent f720d44 commit ea38808
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Command Blocker Bukkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
<artifactId>CommandBlocker</artifactId>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down Expand Up @@ -152,7 +152,7 @@
<dependency>
<groupId>me.treyruffy.commandblocker</groupId>
<artifactId>CommandBlockerShared</artifactId>
<version>2.1.2</version>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ public void loadConfigManager() {
}

public static String getBukkitVersion() {
return Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
String packageName = Bukkit.getServer().getClass().getPackage().getName();
if (!packageName.contains("_R")) {
return "";
}
return packageName.split("\\.")[3];
}

public static void fixCommands() {
Expand Down
4 changes: 2 additions & 2 deletions Command Blocker Bungee/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
<artifactId>CommandBlocker</artifactId>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down Expand Up @@ -111,7 +111,7 @@
<dependency>
<groupId>me.treyruffy.commandblocker</groupId>
<artifactId>CommandBlockerShared</artifactId>
<version>2.1.2</version>
<version>2.1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions Command Blocker Full/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>CommandBlocker</artifactId>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -80,13 +80,13 @@
<dependency>
<groupId>me.treyruffy.commandblocker</groupId>
<artifactId>CommandBlockerBukkit</artifactId>
<version>2.1.2</version>
<version>2.1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>me.treyruffy.commandblocker</groupId>
<artifactId>CommandBlockerBungeeCord</artifactId>
<version>2.1.2</version>
<version>2.1.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion Command Blocker Legacy/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>CommandBlocker</artifactId>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>CommandBlockerLegacy</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion Command Blocker Legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>CommandBlocker</artifactId>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion Command Blocker Shared/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>CommandBlocker</artifactId>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>CommandBlockerShared</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion Command Blocker Shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<parent>
<groupId>me.treyruffy.commandblocker</groupId>
<version>2.1.2</version>
<version>2.1.3</version>
<artifactId>CommandBlocker</artifactId>
<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</license>
</licenses>

<version>2.1.2</version>
<version>2.1.3</version>

<issueManagement>
<system>GitHub</system>
Expand Down

0 comments on commit ea38808

Please sign in to comment.