mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-11-29 22:24:06 +01:00
Possible fix for #57
This commit is contained in:
parent
5d9cd1f23c
commit
aa89e64256
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>de.jeffclan</groupId>
|
||||
<artifactId>JeffChestSort</artifactId>
|
||||
<version>8.2</version>
|
||||
<version>8.3</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>JeffChestSort</name>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.jeffclan.JeffChestSort;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -26,6 +27,10 @@ public class JeffChestSortAdditionalHotkeyListener implements Listener {
|
||||
if(e.getClickedInventory()!=null) {
|
||||
return;
|
||||
}
|
||||
// Possible fix for #57
|
||||
if(e.getInventory().getHolder()==null) return;
|
||||
if(!(e.getInventory().getHolder() instanceof Block)) return;
|
||||
// End Possible fix for #57
|
||||
if(e.getInventory().getType() != InventoryType.CHEST
|
||||
&& e.getInventory().getType() != InventoryType.DISPENSER
|
||||
&& e.getInventory().getType() != InventoryType.DROPPER
|
||||
@ -34,6 +39,7 @@ public class JeffChestSortAdditionalHotkeyListener implements Listener {
|
||||
&& (e.getInventory().getHolder() == null || !e.getInventory().getHolder().getClass().toString().endsWith(".CraftBarrel"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player p = (Player) e.getWhoClicked();
|
||||
|
||||
if(!p.hasPermission("chestsort.use")) return;
|
||||
|
@ -1,6 +1,6 @@
|
||||
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
||||
name: ChestSort
|
||||
version: 8.2
|
||||
version: 8.3
|
||||
api-version: 1.13
|
||||
description: Allows automatic chest sorting
|
||||
author: mfnalex
|
||||
|
Loading…
Reference in New Issue
Block a user