improve location logging
This commit is contained in:
parent
c53d38c6d7
commit
01fed3258d
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user