correct log message

This commit is contained in:
xGinko 2024-02-09 00:17:45 +01:00
parent 73eecd3f7f
commit aa0eedab87
3 changed files with 9 additions and 3 deletions

View File

@ -73,7 +73,7 @@ public class EnableLeashingVillagers implements VillagerOptimizerModule, Listene
&& log_enabled && 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() + " un-leashed a villager 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)); " in world " + location.getWorld().getName()).style(VillagerOptimizer.plugin_style));
} }

View File

@ -142,6 +142,7 @@ public class OptimizeByBlock implements VillagerOptimizerModule, Listener {
.replaceText(placedMaterial) .replaceText(placedMaterial)
)); ));
} }
if (log_enabled) { if (log_enabled) {
final Location location = closestOptimizableVillager.villager().getLocation(); final Location location = closestOptimizableVillager.villager().getLocation();
VillagerOptimizer.getLog().info(Component.text(player.getName() + " optimized villager by block at " + VillagerOptimizer.getLog().info(Component.text(player.getName() + " optimized villager by block at " +
@ -206,6 +207,7 @@ public class OptimizeByBlock implements VillagerOptimizerModule, Listener {
.replaceText(brokenMaterial) .replaceText(brokenMaterial)
)); ));
} }
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 " +

View File

@ -106,8 +106,10 @@ public class OptimizeByNametag implements VillagerOptimizerModule, Listener {
wVillager.setOptimizationType(optimizeEvent.getOptimizationType()); wVillager.setOptimizationType(optimizeEvent.getOptimizationType());
wVillager.saveOptimizeTime(); wVillager.saveOptimizeTime();
if (notify_player) if (notify_player) {
VillagerOptimizer.getLang(player.locale()).nametag_optimize_success.forEach(player::sendMessage); VillagerOptimizer.getLang(player.locale()).nametag_optimize_success.forEach(player::sendMessage);
}
if (log_enabled) { if (log_enabled) {
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() +
@ -133,8 +135,10 @@ public class OptimizeByNametag implements VillagerOptimizerModule, Listener {
wVillager.setOptimizationType(OptimizationType.NONE); wVillager.setOptimizationType(OptimizationType.NONE);
if (notify_player) if (notify_player) {
VillagerOptimizer.getLang(player.locale()).nametag_unoptimize_success.forEach(player::sendMessage); VillagerOptimizer.getLang(player.locale()).nametag_unoptimize_success.forEach(player::sendMessage);
}
if (log_enabled) { if (log_enabled) {
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() +