logMode = null;
} else {
logMode = loggingAnnotation.value();
}
Actor sender = context.getLocals().get(Actor.class);
Player player;
if (sender == null) {
return;
}
if (sender instanceof Player) {
player = (Player) sender;
} else {
return;
}
builder.append("WorldEdit: ").append(sender.getName());
if (sender.isPlayer()) {
builder.append(" (in \"").append(player.getWorld().getName()).append("\")");
}
builder.append(": ").append(context.getCommand());
if (context.argsLength() > 0) {
builder.append(" ").append(context.getJoinedStrings(0));
}
if (logMode != null && sender.isPlayer()) {
Vector position = player.getPosition();
LocalSession session = worldEdit.getSessionManager().get(player);
switch (logMode) {
case PLACEMENT: