Migrate to SLF4J

This commit is contained in:
matt
2019-04-02 18:21:02 -04:00
parent 47e66913e3
commit 29692f3fbe
62 changed files with 1346 additions and 1305 deletions

View File

@ -81,20 +81,25 @@ public class SelectionCommand extends SimpleCommand<Operation> {
if (!testPermission(locals)) {
throw new CommandPermissionsException();
}
Contextual<? extends Operation> operationFactory = delegate.call(args, locals);
Actor actor = locals.get(Actor.class);
if (actor instanceof Player) {
try {
Player player = (Player) actor;
LocalSession session = WorldEdit.getInstance().getSessionManager().get(player);
Region selection = session.getSelection(player.getWorld());
EditSession editSession = session.createEditSession(player);
editSession.enableQueue();
locals.put(EditSession.class, editSession);
session.tellVersion(player);
EditContext editContext = new EditContext();
editContext.setDestination(locals.get(EditSession.class));
editContext.setRegion(selection);
Operation operation = operationFactory.createFromContext(editContext);
// Shortcut
if (selection instanceof CuboidRegion && editSession.hasFastMode() && operation instanceof RegionVisitor) {
@ -191,4 +196,4 @@ public class SelectionCommand extends SimpleCommand<Operation> {
}
}