Skip to content

Commit

Permalink
Update version to 1.2.5, fix #27
Browse files Browse the repository at this point in the history
  • Loading branch information
MinusKube committed Sep 15, 2018
1 parent e7a24c7 commit 90b4312
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ repositories {
}
dependencies {
compile 'fr.minuskube.inv:smart-invs:1.2.4'
compile 'fr.minuskube.inv:smart-invs:1.2.5'
}
```

Expand All @@ -45,7 +45,7 @@ dependencies {
<dependency>
<groupId>fr.minuskube.inv</groupId>
<artifactId>smart-invs</artifactId>
<version>1.2.4</version>
<version>1.2.5</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'fr.minuskube.inv'
version '1.2.4'
version '1.2.5'

apply plugin: 'java'
apply plugin: 'maven'
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/fr/minuskube/inv/InventoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,12 @@ public void onPlayerQuit(PlayerQuitEvent e) {

@EventHandler(priority = EventPriority.LOW)
public void onPluginDisable(PluginDisableEvent e) {
new HashSet<>(inventories.entrySet()).forEach(entry -> {
SmartInventory inv = entry.getValue();

new HashMap<>(inventories).forEach((player, inv) -> {
inv.getListeners().stream()
.filter(listener -> listener.getType() == PluginDisableEvent.class)
.forEach(listener -> ((InventoryListener<PluginDisableEvent>) listener).accept(e));

inv.close(entry.getKey());
inv.close(player);
});

inventories.clear();
Expand All @@ -241,7 +239,7 @@ class InvTask extends BukkitRunnable {

@Override
public void run() {
inventories.forEach((player, inv) -> inv.getProvider().update(player, contents.get(player)));
new HashMap<>(inventories).forEach((player, inv) -> inv.getProvider().update(player, contents.get(player)));
}

}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: SmartInvs
version: 1.2.4
version: 1.2.5
description: Inventory API for your Bukkit Plugins.
author: MinusKube
website: https://github.com/MinusKube/SmartInvs
Expand Down

0 comments on commit 90b4312

Please sign in to comment.