Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-24 18:10:08 +01:00
Revert to Guava 17's firstNonNull.
Deprecated but Spigot doesn't include guava18 yet.
Dieser Commit ist enthalten in:
Ursprung
0e200df5be
Commit
bed8a80894
@ -21,7 +21,7 @@ buildscript {
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy {
|
||||
force 'com.google.guava:guava:18.0'
|
||||
force 'com.google.guava:guava:17.0'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ dependencies {
|
||||
compile 'de.schlichtherle:truezip:6.8.3'
|
||||
compile 'rhino:js:1.7R2'
|
||||
compile 'org.yaml:snakeyaml:1.9'
|
||||
compile 'com.google.guava:guava:18.0'
|
||||
compile 'com.google.guava:guava:17.0'
|
||||
compile 'com.sk89q:jchronic:0.2.4a'
|
||||
compile 'com.google.code.findbugs:jsr305:1.3.9'
|
||||
compile 'com.thoughtworks.paranamer:paranamer:2.6'
|
||||
|
@ -30,7 +30,7 @@ import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.util.command.argument.CommandArgs;
|
||||
import com.sk89q.worldedit.util.command.composition.SimpleCommand;
|
||||
|
||||
import static com.google.common.base.MoreObjects.firstNonNull;
|
||||
import static com.google.common.base.Objects.firstNonNull;
|
||||
|
||||
public class ReplaceParser extends SimpleCommand<Contextual<? extends RegionFunction>> {
|
||||
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.function.factory;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.sk89q.worldedit.function.Contextual;
|
||||
import com.sk89q.worldedit.function.EditContext;
|
||||
import com.sk89q.worldedit.function.RegionFunction;
|
||||
@ -28,6 +27,7 @@ import com.sk89q.worldedit.function.visitor.RegionVisitor;
|
||||
import com.sk89q.worldedit.regions.NullRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
|
||||
import static com.google.common.base.Objects.firstNonNull;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
public class Apply implements Contextual<Operation> {
|
||||
@ -48,7 +48,7 @@ public class Apply implements Contextual<Operation> {
|
||||
|
||||
@Override
|
||||
public Operation createFromContext(EditContext context) {
|
||||
return new RegionVisitor(MoreObjects.firstNonNull(context.getRegion(), region), function.createFromContext(context));
|
||||
return new RegionVisitor(firstNonNull(context.getRegion(), region), function.createFromContext(context));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
package com.sk89q.worldedit.function.factory;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
@ -123,7 +123,7 @@ public class Deform implements Contextual<Operation> {
|
||||
final Vector zero;
|
||||
Vector unit;
|
||||
|
||||
Region region = MoreObjects.firstNonNull(context.getRegion(), this.region);
|
||||
Region region = Objects.firstNonNull(context.getRegion(), this.region);
|
||||
|
||||
switch (mode) {
|
||||
case UNIT_CUBE:
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.function.factory;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.NullExtent;
|
||||
import com.sk89q.worldedit.function.Contextual;
|
||||
@ -34,6 +33,7 @@ import com.sk89q.worldedit.math.noise.RandomNoise;
|
||||
import com.sk89q.worldedit.regions.NullRegion;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
|
||||
import static com.google.common.base.Objects.firstNonNull;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.sk89q.worldedit.regions.Regions.*;
|
||||
|
||||
@ -63,8 +63,8 @@ public class Paint implements Contextual<Operation> {
|
||||
|
||||
@Override
|
||||
public Operation createFromContext(EditContext context) {
|
||||
Extent destination = MoreObjects.firstNonNull(context.getDestination(), this.destination);
|
||||
Region region = MoreObjects.firstNonNull(context.getRegion(), this.region);
|
||||
Extent destination = firstNonNull(context.getDestination(), this.destination);
|
||||
Region region = firstNonNull(context.getRegion(), this.region);
|
||||
GroundFunction ground = new GroundFunction(new ExistingBlockMask(destination), function.createFromContext(context));
|
||||
LayerVisitor visitor = new LayerVisitor(asFlatRegion(region), minimumBlockY(region), maximumBlockY(region), ground);
|
||||
visitor.setMask(new NoiseFilter2D(new RandomNoise(), density));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren