2015-10-27 06:14:30 +00:00
|
|
|
/*
|
|
|
|
* WorldEdit, a Minecraft world manipulation toolkit
|
|
|
|
* Copyright (C) sk89q <http://www.sk89q.com>
|
|
|
|
* Copyright (C) WorldEdit team and contributors
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package com.sk89q.worldedit.function;
|
|
|
|
|
2018-07-30 13:26:06 +00:00
|
|
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
|
|
|
2019-03-07 00:58:32 +00:00
|
|
|
import com.sk89q.worldedit.LocalSession;
|
2015-10-27 06:14:30 +00:00
|
|
|
import com.sk89q.worldedit.extent.Extent;
|
|
|
|
import com.sk89q.worldedit.function.pattern.Pattern;
|
|
|
|
import com.sk89q.worldedit.regions.Region;
|
|
|
|
|
2015-10-29 20:05:04 +00:00
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2015-10-27 06:14:30 +00:00
|
|
|
public class EditContext {
|
|
|
|
|
2015-10-29 20:05:04 +00:00
|
|
|
private Extent destination;
|
|
|
|
@Nullable private Region region;
|
|
|
|
@Nullable private Pattern fill;
|
2019-03-07 00:58:32 +00:00
|
|
|
@Nullable private LocalSession session;
|
2015-10-27 06:14:30 +00:00
|
|
|
|
|
|
|
public Extent getDestination() {
|
|
|
|
return destination;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDestination(Extent destination) {
|
2015-10-29 20:05:04 +00:00
|
|
|
checkNotNull(destination, "destination");
|
2015-10-27 06:14:30 +00:00
|
|
|
this.destination = destination;
|
|
|
|
}
|
|
|
|
|
2015-10-29 20:05:04 +00:00
|
|
|
@Nullable
|
2015-10-27 06:14:30 +00:00
|
|
|
public Region getRegion() {
|
|
|
|
return region;
|
|
|
|
}
|
|
|
|
|
2015-10-29 20:05:04 +00:00
|
|
|
public void setRegion(@Nullable Region region) {
|
2015-10-27 06:14:30 +00:00
|
|
|
this.region = region;
|
|
|
|
}
|
|
|
|
|
2015-10-29 20:05:04 +00:00
|
|
|
@Nullable
|
2015-10-27 06:14:30 +00:00
|
|
|
public Pattern getFill() {
|
|
|
|
return fill;
|
|
|
|
}
|
|
|
|
|
2015-10-29 20:05:04 +00:00
|
|
|
public void setFill(@Nullable Pattern fill) {
|
2015-10-27 06:14:30 +00:00
|
|
|
this.fill = fill;
|
|
|
|
}
|
|
|
|
|
2019-03-07 00:58:32 +00:00
|
|
|
@Nullable
|
|
|
|
public LocalSession getSession() {
|
|
|
|
return session;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setSession(@Nullable LocalSession session) {
|
|
|
|
this.session = session;
|
|
|
|
}
|
2015-10-27 06:14:30 +00:00
|
|
|
}
|