improve location logging

This commit is contained in:
xGinko 2024-02-09 00:49:25 +01:00
parent c53d38c6d7
commit 01fed3258d
5 changed files with 13 additions and 13 deletions

View File

@ -84,8 +84,8 @@ public class EnableLeashingVillagers implements VillagerOptimizerModule, Listene
if (log_enabled) { if (log_enabled) {
final Location location = villager.getLocation(); final Location location = villager.getLocation();
VillagerOptimizer.getLog().info(Component.text(player.getName() + " leashed a villager at " + VillagerOptimizer.getLog().info(Component.text(player.getName() + " leashed a villager at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getBlockX() + ", y=" + location.getBlockY() + ", z=" + location.getBlockZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
} }
}); });

View File

@ -78,8 +78,8 @@ public class RestockOptimizedTrades implements VillagerOptimizerModule, Listener
if (log_enabled) { if (log_enabled) {
final Location location = wVillager.villager().getLocation(); final Location location = wVillager.villager().getLocation();
VillagerOptimizer.getLog().info(Component.text("Restocked optimized villager at " + VillagerOptimizer.getLog().info(Component.text("Restocked optimized villager at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getBlockX() + ", y=" + location.getBlockY() + ", z=" + location.getBlockZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
} }
} }

View File

@ -211,8 +211,8 @@ public class OptimizeByBlock implements VillagerOptimizerModule, Listener {
if (log_enabled) { if (log_enabled) {
final Location location = closestOptimizedVillager.villager().getLocation(); final Location location = closestOptimizedVillager.villager().getLocation();
VillagerOptimizer.getLog().info(Component.text(player.getName() + " unoptimized villager by block at " + VillagerOptimizer.getLog().info(Component.text(player.getName() + " unoptimized villager by block at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getBlockX() + ", y=" + location.getBlockY() + ", z=" + location.getBlockZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
} }
} }

View File

@ -114,8 +114,8 @@ public class OptimizeByNametag implements VillagerOptimizerModule, Listener {
final Location location = wVillager.villager().getLocation(); final Location location = wVillager.villager().getLocation();
VillagerOptimizer.getLog().info(Component.text(player.getName() + VillagerOptimizer.getLog().info(Component.text(player.getName() +
" optimized villager by nametag '" + name + "' at " + " optimized villager by nametag '" + name + "' at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getBlockX() + ", y=" + location.getBlockY() + ", z=" + location.getBlockZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
} else { } else {
event.setCancelled(true); event.setCancelled(true);
@ -144,7 +144,7 @@ public class OptimizeByNametag implements VillagerOptimizerModule, Listener {
VillagerOptimizer.getLog().info(Component.text(player.getName() + VillagerOptimizer.getLog().info(Component.text(player.getName() +
" unoptimized villager by nametag '" + name + "' at " + " unoptimized villager by nametag '" + name + "' at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
} }
} }

View File

@ -164,8 +164,8 @@ public class OptimizeByWorkstation implements VillagerOptimizerModule, Listener
final Location location = finalToOptimize.villager().getLocation(); final Location location = finalToOptimize.villager().getLocation();
VillagerOptimizer.getLog().info(Component.text(player.getName() + VillagerOptimizer.getLog().info(Component.text(player.getName() +
" optimized villager by workstation (" + placed.getType().toString().toLowerCase() + ") at " + " optimized villager by workstation (" + placed.getType().toString().toLowerCase() + ") at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getBlockX() + ", y=" + location.getBlockY() + ", z=" + location.getBlockZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
}, toOptimize.canLooseProfession() ? resettable_delay_millis : delay_millis, TimeUnit.MILLISECONDS)); }, toOptimize.canLooseProfession() ? resettable_delay_millis : delay_millis, TimeUnit.MILLISECONDS));
} }
@ -227,8 +227,8 @@ public class OptimizeByWorkstation implements VillagerOptimizerModule, Listener
final Location location = closestOptimizedVillager.villager().getLocation(); final Location location = closestOptimizedVillager.villager().getLocation();
VillagerOptimizer.getLog().info(Component.text(player.getName() + VillagerOptimizer.getLog().info(Component.text(player.getName() +
" unoptimized villager by workstation (" + broken.getType().toString().toLowerCase() + ") at " + " unoptimized villager by workstation (" + broken.getType().toString().toLowerCase() + ") at " +
"x=" + location.getX() + ", y=" + location.getY() + ", z=" + location.getZ() + "x=" + location.getBlockX() + ", y=" + location.getBlockY() + ", z=" + location.getBlockZ() +
" in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style)); ", world=" + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }
} }
} }