Don't require Selection classifier for region binding

This commit is contained in:
Jesse Boyd 2018-08-23 13:37:03 +10:00
parent f43faae917
commit 963d1192c2
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -81,15 +81,14 @@ public class WorldEditBinding extends BindingHelper {
* Gets a selection from a {@link ArgumentStack}.
*
* @param context the context
* @param selection the annotation
* @return a selection
* @throws IncompleteRegionException if no selection is available
* @throws ParameterException on other error
*/
@BindingMatch(classifier = Selection.class,
@BindingMatch(
type = Region.class,
behavior = BindingBehavior.PROVIDES)
public Object getSelection(ArgumentStack context, Selection selection) throws IncompleteRegionException, ParameterException {
public Object getSelection(ArgumentStack context) throws IncompleteRegionException, ParameterException {
Player sender = getPlayer(context);
LocalSession session = worldEdit.getSessionManager().get(sender);
return session.getSelection(FawePlayer.wrap(sender).getWorldForEditing());