14.0.3 - should fix issues on paper 1.20.6
This commit is contained in:
parent
02f4d96ff6
commit
7a11054b56
4
pom.xml
4
pom.xml
|
@ -9,7 +9,7 @@
|
|||
<name>ChestSort</name>
|
||||
<url>https://www.chestsort.de</url>
|
||||
<description>Allows automatic chest sorting!</description>
|
||||
<version>14.0.0</version>
|
||||
<version>14.0.3</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
@ -226,7 +226,7 @@
|
|||
<dependency>
|
||||
<groupId>com.jeff-media.jefflib</groupId>
|
||||
<artifactId>jefflib</artifactId>
|
||||
<version>13.0.3</version>
|
||||
<version>14.0.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -260,22 +260,6 @@ public class ChestSortPlugin extends JavaPlugin {
|
|||
this.chestSortListener = chestSortListener;
|
||||
}
|
||||
|
||||
public int getMcMinorVersion() {
|
||||
return mcMinorVersion;
|
||||
}
|
||||
|
||||
public void setMcMinorVersion(int mcMinorVersion) {
|
||||
this.mcMinorVersion = mcMinorVersion;
|
||||
}
|
||||
|
||||
public String getMcVersion() {
|
||||
return mcVersion;
|
||||
}
|
||||
|
||||
public void setMcVersion(String mcVersion) {
|
||||
this.mcVersion = mcVersion;
|
||||
}
|
||||
|
||||
public Messages getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
@ -598,10 +582,12 @@ public class ChestSortPlugin extends JavaPlugin {
|
|||
|
||||
JeffLib.init(this);
|
||||
|
||||
String tmpVersion = getServer().getClass().getPackage().getName();
|
||||
/*String tmpVersion = getServer().getClass().getPackage().getName();
|
||||
setMcVersion(tmpVersion.substring(tmpVersion.lastIndexOf('.') + 1));
|
||||
tmpVersion = getMcVersion().substring(getMcVersion().indexOf("_") + 1);
|
||||
setMcMinorVersion(Integer.parseInt(tmpVersion.substring(0, tmpVersion.indexOf("_"))));
|
||||
setMcMinorVersion(Integer.parseInt(tmpVersion.substring(0, tmpVersion.indexOf("_"))));*/
|
||||
|
||||
|
||||
|
||||
load(false);
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ public class ChestSortOrganizer {
|
|||
|
||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
||||
boolean doesInventoryContain(Inventory inv, Material mat) {
|
||||
for (ItemStack item : Utils.getStorageContents(inv, plugin.getMcMinorVersion())) {
|
||||
for (ItemStack item : Utils.getStorageContents(inv)) {
|
||||
if (item == null) continue;
|
||||
if (item.getType() == mat) {
|
||||
return true;
|
||||
|
|
|
@ -12,10 +12,7 @@ import org.bukkit.inventory.ItemStack;
|
|||
|
||||
public class Utils {
|
||||
|
||||
public static ItemStack[] getStorageContents(Inventory inv, int bukkitMinorVersion) {
|
||||
if(bukkitMinorVersion<=8) {
|
||||
return inv.getContents();
|
||||
}
|
||||
public static ItemStack[] getStorageContents(Inventory inv) {
|
||||
return inv.getStorageContents();
|
||||
}
|
||||
|
||||
|
|
|
@ -341,7 +341,6 @@ mute-protection-plugins: false
|
|||
# that contain the word "Backpack"
|
||||
blocked-inventory-holders-regex:
|
||||
- ".*[Bb]ack[Pp]ack.*"
|
||||
- "\Qcom.loohp.interactivechat.objectholders.ICInventoryHolder\E"
|
||||
|
||||
##########################
|
||||
##### Sorting Method #####
|
||||
|
|
Loading…
Reference in New Issue