mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-01-20 23:21:26 +01:00
3.7 added barrel support
This commit is contained in:
parent
b5de10dd67
commit
8019717f50
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>de.jeffclan</groupId>
|
||||
<artifactId>JeffChestSort</artifactId>
|
||||
<version>3.6</version>
|
||||
<version>3.7</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>JeffChestSort</name>
|
||||
|
@ -96,9 +96,15 @@ public class JeffChestSortListener implements Listener {
|
||||
|
||||
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(p.getUniqueId().toString());
|
||||
|
||||
// We use .getClass().toString() for new items instead of directly comparing the ENUM, because we want to
|
||||
// keep compatability between different minecraft versions (e.g. there is no BARREL prior 1.14)
|
||||
// WARNING: The names are inconsistent! A chest will return org.bukkit.craftbukkit.v1_14_R1.block.CraftChest
|
||||
// while a double chest returns org.bukkit.block.DoubleChest
|
||||
//p.sendMessage(event.getInventory().getHolder().toString());
|
||||
if (!(event.getInventory().getHolder() instanceof Chest)
|
||||
&& !(event.getInventory().getHolder() instanceof DoubleChest)
|
||||
&& !(event.getInventory().getHolder() instanceof ShulkerBox)) {
|
||||
&& !(event.getInventory().getHolder() instanceof ShulkerBox)
|
||||
&& !(event.getInventory().getHolder().getClass().toString().endsWith(".CraftBarrel"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
||||
name: ChestSort
|
||||
version: 3.6
|
||||
version: 3.7
|
||||
api-version: 1.13
|
||||
description: Allows automatic chest sorting
|
||||
author: mfnalex
|
||||
|
Loading…
Reference in New Issue
Block a user