mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-08 13:44:59 +00:00
@@ -65,9 +65,11 @@ public class GenerateLoot implements Listener {
|
|||||||
// if the distance is less than 1, it's the same chest
|
// if the distance is less than 1, it's the same chest
|
||||||
for (Block chest : toolStats.playerInteract.openedChests.keySet()) {
|
for (Block chest : toolStats.playerInteract.openedChests.keySet()) {
|
||||||
Location chestLocation = chest.getLocation();
|
Location chestLocation = chest.getLocation();
|
||||||
double distance = lootLocation.distance(chestLocation);
|
if (chest.getWorld() == lootLocation.getWorld()) {
|
||||||
if (distance <= 1.0) {
|
double distance = lootLocation.distance(chestLocation);
|
||||||
openedChest = chest;
|
if (distance <= 1.0) {
|
||||||
|
openedChest = chest;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ignore if the chest is not in the same location
|
// ignore if the chest is not in the same location
|
||||||
|
|||||||
Reference in New Issue
Block a user