mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 12:36:40 +00:00
Merge branch 'master' into breaking
This commit is contained in:
@ -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> {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user