Fix #38
This commit is contained in:
parent
834935ec9d
commit
098d1e26b2
|
@ -4,7 +4,7 @@
|
|||
<groupId>net.seanomik</groupId>
|
||||
<artifactId>energeticstorage</artifactId>
|
||||
<name>EnergeticStorage</name>
|
||||
<version>0.7.5-SNAPSHOT</version>
|
||||
<version>0.7.6-SNAPSHOT</version>
|
||||
<build>
|
||||
<defaultGoal>clean package</defaultGoal>
|
||||
<resources>
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>net.seanomik</groupId>
|
||||
<artifactId>energeticstorage</artifactId>
|
||||
<version>0.7.5-SNAPSHOT</version>
|
||||
<version>0.7.6-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>EnergeticStorage</name>
|
||||
|
|
|
@ -383,6 +383,22 @@ public class ESTerminalGUI implements InventoryHolder, Listener {
|
|||
openSystem.setSortOrder(sortOrder);
|
||||
initializeItems(player, openSystem);
|
||||
} else {
|
||||
// Check if the player is clicking the glass panes, if they are then cancel the event.
|
||||
if (clickedItem != null && clickedItem.hasItemMeta()) {
|
||||
ItemMeta meta = clickedItem.getItemMeta();
|
||||
|
||||
if (meta.hasDisplayName()) {
|
||||
String display = meta.getDisplayName();
|
||||
|
||||
if ( (display.isEmpty() || display.startsWith("To insert items, put them ")) &&
|
||||
(clickedItem.getType() == Material.BLACK_STAINED_GLASS_PANE || clickedItem.getType() == Material.LIME_STAINED_GLASS_PANE) ) {
|
||||
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (clickType) {
|
||||
case SHIFT_IN:
|
||||
if (Utils.isItemValid(clickedItem)) {
|
||||
|
|
Loading…
Reference in New Issue