mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Fixed a null pointer. Merged in a bunch of CLI stuff.
This commit is contained in:
@ -34,6 +34,8 @@ import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
import com.sk89q.worldedit.world.weather.WeatherType;
|
||||
import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||
import javax.annotation.Nullable;
|
||||
import java.nio.file.Path;
|
||||
import java.util.PriorityQueue;
|
||||
@ -132,6 +134,23 @@ public abstract class AbstractWorld implements World {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WeatherType getWeather() {
|
||||
return WeatherTypes.CLEAR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getRemainingWeatherDuration() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWeather(WeatherType weatherType) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setWeather(WeatherType weatherType, long duration) {
|
||||
}
|
||||
private class QueuedEffect implements Comparable<QueuedEffect> {
|
||||
private final Vector3 position;
|
||||
private final BlockType blockType;
|
||||
|
@ -63,6 +63,10 @@ public class NullWorld extends AbstractWorld {
|
||||
return "null";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return "null";
|
||||
}
|
||||
@Override
|
||||
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, boolean notifyAndLight) throws WorldEditException {
|
||||
return false;
|
||||
|
@ -106,10 +106,6 @@ public class ItemType implements RegistryItem, Keyed {
|
||||
return this.blockType;
|
||||
}
|
||||
|
||||
public void setBlockType(BlockType blockType) {
|
||||
this.blockType = blockType;
|
||||
}
|
||||
|
||||
public BaseItem getDefaultState() {
|
||||
if (defaultState == null) {
|
||||
this.defaultState = new BaseItemStack(this);
|
||||
|
@ -37,5 +37,7 @@ public interface CategoryRegistry<T extends Keyed> {
|
||||
*/
|
||||
Set<T> getCategorisedByName(String category);
|
||||
|
||||
Set<T> getAll(final Category<T> category);
|
||||
default Set<T> getAll(final Category<T> category) {
|
||||
return getCategorisedByName(category.getId());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user