Skip to content

Commit 859cf17

Browse files
committed
Fixed issue #25
1 parent c971092 commit 859cf17

File tree

9 files changed

+9
-41
lines changed

9 files changed

+9
-41
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ hs_err_pid*
5454
*.iws
5555
.idea/
5656
AutoPickup - Recode.iml
57+
AutoPickup - Recode.iml
58+
*.iml

AutoPickup - Recode.iml

Lines changed: 0 additions & 38 deletions
This file was deleted.

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>us.thezircon.play</groupId>
88
<artifactId>AutoPickup</artifactId>
9-
<version>1.3.1-SNAPSHOT</version>
9+
<version>1.3.2-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>AutoPickup</name>

src/main/java/us/thezircon/play/autopickup/listeners/EntityDeathEventListener.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.bukkit.inventory.ItemStack;
1010
import us.thezircon.play.autopickup.AutoPickup;
1111

12+
import java.util.Iterator;
1213
import java.util.List;
1314

1415
public class EntityDeathEventListener implements Listener {
@@ -46,9 +47,12 @@ public void onDeath(EntityDeathEvent e) {
4647
e.setDroppedExp(0);
4748

4849
// Drops
49-
for (ItemStack drops : e.getDrops()) {
50+
Iterator<ItemStack> iter = e.getDrops().iterator();
51+
while (iter.hasNext()) {
52+
ItemStack drops = iter.next();
5053
if (player.getInventory().firstEmpty() != -1) { // has space
5154
player.getInventory().addItem(drops);
55+
iter.remove();
5256
} else { // inv full
5357
if (doFullInvMSG) {
5458
player.sendMessage(PLUGIN.getMsg().getPrefix() + " " + PLUGIN.getMsg().getFullInventory());

target/classes/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: AutoPickup
2-
version: 1.3.1-SNAPSHOT
2+
version: 1.3.2-SNAPSHOT
33
main: us.thezircon.play.autopickup.AutoPickup
44
prefix: AutoPickup
55
authors: [BUTTERFIELD8]
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)