Skip to content

Commit 0c2acbc

Browse files
author
Loki
committed
Fixed removal of inv items on view close
1 parent 0581f12 commit 0c2acbc

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.codehusky</groupId>
88
<artifactId>HuskyUI</artifactId>
9-
<version>0.4.0</version>
9+
<version>0.4.1</version>
1010

1111
<repositories>
1212
<repository>

src/main/java/com/codehusky/huskyui/HuskyUI.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class HuskyUI {
5353
/**
5454
* The Version of HuskyUI for Sponge.
5555
*/
56-
public static final String PLUGIN_VERSION = "0.4.0";
56+
public static final String PLUGIN_VERSION = "0.4.1";
5757

5858
/**
5959
* The HuskyUI {@link Logger} used throughout the plugin.

src/main/java/com/codehusky/huskyui/InventoryUtil.java

-5
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,11 @@
99

1010
public class InventoryUtil {
1111
public static void close(Player player) {
12-
check(player.getOpenInventory()).ifPresent(Inventory::clear);
1312
player.closeInventory();
1413
}
1514

1615
public static void open(Player player, Inventory inventory) {
17-
check(player.getOpenInventory()).ifPresent(Inventory::clear);
1816
player.openInventory(inventory);
1917
}
2018

21-
public static Optional<Container> check(Optional<Container> inventory) {
22-
return inventory.filter(i -> i.getProperties(StringProperty.class).stream().anyMatch(p -> p.equals(StringProperty.of("huskui-page"))));
23-
}
2419
}

0 commit comments

Comments
 (0)