Merge branch 'master' into breaking

This commit is contained in:
Jesse Boyd
2019-04-05 15:47:04 +11:00
43 changed files with 985 additions and 919 deletions

View File

@ -81,17 +81,21 @@ 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.enableStandardMode();
locals.put(EditSession.class, editSession);
session.tellVersion(player);
EditContext editContext = new EditContext();
editContext.setDestination(locals.get(EditSession.class));
editContext.setRegion(selection);
@ -193,4 +197,4 @@ public class SelectionCommand extends SimpleCommand<Operation> {
}
}