SteamWar/BauSystem2.0
Archiviert
12
0

Fix count to TNTClickListener
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2022-07-05 17:27:46 +02:00
Ursprung 096ee8d586
Commit 58a6a855a8

Datei anzeigen

@ -41,7 +41,7 @@ public class TNTClickListener implements Listener {
Entity entity = event.getRightClicked();
if (event.getRightClicked() instanceof TNTPrimed) {
TNTPrimed tntPrimed = (TNTPrimed) entity;
long count = Bukkit.getWorlds().get(0).getEntitiesByClass(TNTPrimed.class).stream().filter(e -> e.getLocation().equals(tntPrimed.getLocation())).count();
long count = Bukkit.getWorlds().get(0).getEntitiesByClass(TNTPrimed.class).stream().filter(e -> e.getLocation().distanceSquared(tntPrimed.getLocation()) < 0.1).count();
BauSystem.MESSAGE.sendPrefixless("TNT_CLICK_HEADER", event.getPlayer());
BauSystem.MESSAGE.sendPrefixless("TNT_CLICK_ORDER", event.getPlayer(), getOrder(tntPrimed));
BauSystem.MESSAGE.sendPrefixless("TNT_CLICK_FUSE_TIME", event.getPlayer(), tntPrimed.getFuseTicks());