mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-12-02 07:33:23 +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>
|
<groupId>de.jeffclan</groupId>
|
||||||
<artifactId>JeffChestSort</artifactId>
|
<artifactId>JeffChestSort</artifactId>
|
||||||
<version>8.2</version>
|
<version>8.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>JeffChestSort</name>
|
<name>JeffChestSort</name>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package de.jeffclan.JeffChestSort;
|
package de.jeffclan.JeffChestSort;
|
||||||
|
|
||||||
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -26,6 +27,10 @@ public class JeffChestSortAdditionalHotkeyListener implements Listener {
|
|||||||
if(e.getClickedInventory()!=null) {
|
if(e.getClickedInventory()!=null) {
|
||||||
return;
|
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
|
if(e.getInventory().getType() != InventoryType.CHEST
|
||||||
&& e.getInventory().getType() != InventoryType.DISPENSER
|
&& e.getInventory().getType() != InventoryType.DISPENSER
|
||||||
&& e.getInventory().getType() != InventoryType.DROPPER
|
&& 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"))) {
|
&& (e.getInventory().getHolder() == null || !e.getInventory().getHolder().getClass().toString().endsWith(".CraftBarrel"))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player p = (Player) e.getWhoClicked();
|
Player p = (Player) e.getWhoClicked();
|
||||||
|
|
||||||
if(!p.hasPermission("chestsort.use")) return;
|
if(!p.hasPermission("chestsort.use")) return;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
||||||
name: ChestSort
|
name: ChestSort
|
||||||
version: 8.2
|
version: 8.3
|
||||||
api-version: 1.13
|
api-version: 1.13
|
||||||
description: Allows automatic chest sorting
|
description: Allows automatic chest sorting
|
||||||
author: mfnalex
|
author: mfnalex
|
||||||
|
Loading…
Reference in New Issue
Block a user