Fix #38
This commit is contained in:
parent
834935ec9d
commit
098d1e26b2
|
@ -4,7 +4,7 @@
|
||||||
<groupId>net.seanomik</groupId>
|
<groupId>net.seanomik</groupId>
|
||||||
<artifactId>energeticstorage</artifactId>
|
<artifactId>energeticstorage</artifactId>
|
||||||
<name>EnergeticStorage</name>
|
<name>EnergeticStorage</name>
|
||||||
<version>0.7.5-SNAPSHOT</version>
|
<version>0.7.6-SNAPSHOT</version>
|
||||||
<build>
|
<build>
|
||||||
<defaultGoal>clean package</defaultGoal>
|
<defaultGoal>clean package</defaultGoal>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<groupId>net.seanomik</groupId>
|
<groupId>net.seanomik</groupId>
|
||||||
<artifactId>energeticstorage</artifactId>
|
<artifactId>energeticstorage</artifactId>
|
||||||
<version>0.7.5-SNAPSHOT</version>
|
<version>0.7.6-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>EnergeticStorage</name>
|
<name>EnergeticStorage</name>
|
||||||
|
|
|
@ -383,6 +383,22 @@ public class ESTerminalGUI implements InventoryHolder, Listener {
|
||||||
openSystem.setSortOrder(sortOrder);
|
openSystem.setSortOrder(sortOrder);
|
||||||
initializeItems(player, openSystem);
|
initializeItems(player, openSystem);
|
||||||
} else {
|
} 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) {
|
switch (clickType) {
|
||||||
case SHIFT_IN:
|
case SHIFT_IN:
|
||||||
if (Utils.isItemValid(clickedItem)) {
|
if (Utils.isItemValid(clickedItem)) {
|
||||||
|
|
Loading…
Reference in New Issue