We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63d508f commit 5eebcb9Copy full SHA for 5eebcb9
src/main/java/lol/hyper/toolstats/events/GenerateLoot.java
@@ -65,9 +65,11 @@ public void onGenerateLoot(LootGenerateEvent event) {
65
// if the distance is less than 1, it's the same chest
66
for (Block chest : toolStats.playerInteract.openedChests.keySet()) {
67
Location chestLocation = chest.getLocation();
68
- double distance = lootLocation.distance(chestLocation);
69
- if (distance <= 1.0) {
70
- openedChest = chest;
+ if (chest.getWorld() == lootLocation.getWorld()) {
+ double distance = lootLocation.distance(chestLocation);
+ if (distance <= 1.0) {
71
+ openedChest = chest;
72
+ }
73
}
74
75
// ignore if the chest is not in the same location
0 commit comments