Remove PlotBlock

This commit is contained in:
Jesse Boyd
2019-11-04 19:55:55 +00:00
parent 930dee9326
commit 37f608258f
357 changed files with 1254 additions and 2020 deletions

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.api;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.plot.object.PlotId;
public abstract class Argument<T> {

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.plot.commands.RequiredType;
public interface CommandCaller {

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.plot.commands.CommandCategory;
import com.github.intellectualsites.plotsquared.plot.commands.RequiredType;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.Map;
/**

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
/**
* Various settings for controlling the input and output of a {@link
* Configuration}.

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.List;
import java.util.Map;
import java.util.Set;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
/**
* Exception thrown when attempting to load an invalid {@link Configuration}.
*/

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.Map;
/**

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
/**
* Various settings for controlling the input and output of a {@link
* MemoryConfiguration}.

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.file;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.Configuration;
import com.github.intellectualsites.plotsquared.configuration.InvalidConfigurationException;
import com.github.intellectualsites.plotsquared.configuration.MemoryConfiguration;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.file;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.Configuration;
import com.github.intellectualsites.plotsquared.configuration.MemoryConfiguration;
import com.github.intellectualsites.plotsquared.configuration.MemoryConfigurationOptions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.file;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.Configuration;
import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection;
import com.github.intellectualsites.plotsquared.configuration.InvalidConfigurationException;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.file;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
/**
* Various settings for controlling the input and output of a {@link
* YamlConfiguration}.

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.file;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerialization;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.error.YAMLException;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.file;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection;
import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerializable;
import com.github.intellectualsites.plotsquared.configuration.serialization.ConfigurationSerialization;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.serialization;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.Map;
/**

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.serialization;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.Configuration;
import java.lang.reflect.Constructor;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.serialization;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.configuration.serialization;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
/**
* The JSONException is thrown by the JSON.org classes when things are amiss.
*

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.io.IOException;
import java.io.StringWriter;
import java.io.Writer;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
/**
* The <code>JSONString</code> interface allows a <code>toJSONString()</code> method so that a class can change the
* behavior of <code>JSONObject.toString()</code>, <code>JSONArray.toString()</code>, and

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.Iterator;
/**

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.json;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import java.util.HashMap;
/**

View File

@ -4,14 +4,12 @@ import com.github.intellectualsites.plotsquared.plot.generator.GeneratorWrapper;
import com.github.intellectualsites.plotsquared.plot.generator.HybridUtils;
import com.github.intellectualsites.plotsquared.plot.generator.IndependentPlotGenerator;
import com.github.intellectualsites.plotsquared.plot.logger.ILogger;
import com.github.intellectualsites.plotsquared.plot.object.BlockRegistry;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import com.github.intellectualsites.plotsquared.plot.util.ChatManager;
import com.github.intellectualsites.plotsquared.plot.util.ChunkManager;
import com.github.intellectualsites.plotsquared.plot.util.EconHandler;
import com.github.intellectualsites.plotsquared.plot.util.EventUtil;
import com.github.intellectualsites.plotsquared.plot.util.InventoryUtil;
import com.github.intellectualsites.plotsquared.plot.util.LegacyMappings;
import com.github.intellectualsites.plotsquared.plot.util.SchematicHandler;
import com.github.intellectualsites.plotsquared.plot.util.SetupUtils;
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
@ -89,8 +87,12 @@ public interface IPlotMain extends ILogger {
/**
* Gets the NMS package prefix.
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
*
* @return The NMS package prefix
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
*/
String getNMSPackage();
@ -246,9 +248,4 @@ public interface IPlotMain extends ILogger {
@NotNull IndependentPlotGenerator getDefaultGenerator();
List<String> getPluginIds();
BlockRegistry<?> getBlockRegistry();
LegacyMappings getLegacyMappings();
}

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
public enum Platform {
Bukkit, Sponge, Spigot, Paper

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection;
import com.github.intellectualsites.plotsquared.configuration.MemorySection;
import com.github.intellectualsites.plotsquared.configuration.file.YamlConfiguration;
@ -24,7 +26,7 @@ import com.github.intellectualsites.plotsquared.plot.object.BlockBucket;
import com.github.intellectualsites.plotsquared.plot.object.Location;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.PlotArea;
import com.github.intellectualsites.plotsquared.plot.object.PlotBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.github.intellectualsites.plotsquared.plot.object.PlotCluster;
import com.github.intellectualsites.plotsquared.plot.object.PlotFilter;
import com.github.intellectualsites.plotsquared.plot.object.PlotId;
@ -154,7 +156,7 @@ import java.util.zip.ZipInputStream;
//
// Register configuration serializable classes
//
ConfigurationSerialization.registerClass(PlotBlock.class, "PlotBlock");
// ConfigurationSerialization.registerClass(BlockState.class, "BlockState");
ConfigurationSerialization.registerClass(BlockBucket.class, "BlockBucket");
try {

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
public class PlotVersion {
public final int year, month, day, hash, build;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.Plot;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import lombok.RequiredArgsConstructor;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.Location;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.object.Plot;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.Location;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotWorld;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
@ -15,7 +17,7 @@ import com.github.intellectualsites.plotsquared.plot.object.Location;
import com.github.intellectualsites.plotsquared.plot.object.OfflinePlotPlayer;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.PlotArea;
import com.github.intellectualsites.plotsquared.plot.object.PlotBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.github.intellectualsites.plotsquared.plot.object.PlotId;
import com.github.intellectualsites.plotsquared.plot.object.PlotMessage;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
@ -124,7 +126,7 @@ import java.util.concurrent.CompletableFuture;
// Classes
this.scope.put("Location", Location.class);
this.scope.put("PlotBlock", PlotBlock.class);
this.scope.put("BlockState", BlockState.class);
this.scope.put("Plot", Plot.class);
this.scope.put("PlotId", PlotId.class);
this.scope.put("Runnable", Runnable.class);

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Argument;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.generator.HybridPlotManager;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.database.DBFunc;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Argument;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.flag.FlagManager;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
@ -10,10 +12,10 @@ import com.github.intellectualsites.plotsquared.plot.flag.FlagManager;
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
import com.github.intellectualsites.plotsquared.plot.flag.IntegerFlag;
import com.github.intellectualsites.plotsquared.plot.flag.ListFlag;
import com.github.intellectualsites.plotsquared.plot.flag.PlotBlockListFlag;
import com.github.intellectualsites.plotsquared.plot.flag.BlockStateListFlag;
import com.github.intellectualsites.plotsquared.plot.object.Location;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.PlotBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
import com.github.intellectualsites.plotsquared.plot.util.MathMan;
@ -21,6 +23,7 @@ import com.github.intellectualsites.plotsquared.plot.util.Permissions;
import com.github.intellectualsites.plotsquared.plot.util.PlotWeather;
import com.github.intellectualsites.plotsquared.plot.util.StringComparison;
import com.github.intellectualsites.plotsquared.plot.util.StringMan;
import com.sk89q.worldedit.world.block.BlockType;
import java.util.ArrayList;
import java.util.Arrays;
@ -32,6 +35,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
@CommandDeclaration(command = "setflag", aliases = {"f", "flag",
"setflag"}, usage = "/plot flag <set|remove|add|list|info> <flag> <value>", description = "Set plot flags", category = CommandCategory.SETTINGS, requiredType = RequiredType.NONE, permission = "plots.flag")
@ -61,12 +65,12 @@ public class FlagCmd extends SubCommand {
} catch (NumberFormatException ignore) {
}
} else if (flag instanceof PlotBlockListFlag) {
final PlotBlockListFlag blockListFlag = (PlotBlockListFlag) flag;
final HashSet<PlotBlock> parsedBlocks = blockListFlag.parseValue(value);
for (final PlotBlock block : parsedBlocks) {
} else if (flag instanceof BlockStateListFlag) {
final BlockStateListFlag blockListFlag = (BlockStateListFlag) flag;
Set<BlockType> parsedBlocks = blockListFlag.parseValue(value);
for (final BlockType block : parsedBlocks) {
final String permission = Captions.PERMISSION_SET_FLAG_KEY_VALUE
.f(key.toLowerCase(), block.getRawId().toString().toLowerCase());
.f(key.toLowerCase(), block.toString().toLowerCase());
final boolean result = Permissions.hasPermission(player, permission);
if (!result) {
MainUtil.sendMessage(player, Captions.NO_PERMISSION,

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.util.StringMan;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandCaller;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.Plot;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Argument;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.PlotSquared.SortType;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandCaller;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.Location;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
@ -8,6 +10,7 @@ import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.PlotInventory;
import com.github.intellectualsites.plotsquared.plot.object.PlotItemStack;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import com.sk89q.worldedit.world.item.ItemTypes;
import java.util.Arrays;
import java.util.Collection;
@ -39,11 +42,11 @@ import java.util.Locale;
if (item == null) {
return true;
}
if (item.getPlotBlock().equalsAny(7, "bedrock")) {
if (item.getType() == ItemTypes.BEDROCK) {
plot.removeFlag(Flags.MUSIC);
Captions.FLAG_REMOVED.send(player);
} else if (item.name.toLowerCase(Locale.ENGLISH).contains("disc")) {
plot.setFlag(Flags.MUSIC, item.getPlotBlock().getRawId());
plot.setFlag(Flags.MUSIC, item);
Captions.FLAG_ADDED.send(player);
} else {
Captions.FLAG_NOT_ADDED.send(player);

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.config.Settings;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.json.JSONObject;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.configuration.ConfigurationSection;
import com.github.intellectualsites.plotsquared.configuration.MemorySection;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Argument;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandCaller;
public enum RequiredType {

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.Command;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
@ -10,7 +12,7 @@ import com.github.intellectualsites.plotsquared.plot.flag.FlagManager;
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
import com.github.intellectualsites.plotsquared.plot.object.BlockBucket;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.PlotBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.github.intellectualsites.plotsquared.plot.object.PlotManager;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
@ -60,7 +62,7 @@ import java.util.stream.IntStream;
Captions.PERMISSION_SET_COMPONENT.f(component));
return false;
}
// PlotBlock[] blocks;
// BlockState[] blocks;
BlockBucket bucket;
try {
if (args.length < 2) {
@ -73,7 +75,7 @@ import java.util.stream.IntStream;
} catch (final UnknownBlockException unknownBlockException) {
final String unknownBlock = unknownBlockException.getUnknownValue();
Captions.NOT_VALID_BLOCK.send(player, unknownBlock);
StringComparison<PlotBlock>.ComparisonResult match =
StringComparison<BlockState>.ComparisonResult match =
WorldUtil.IMP.getClosestBlock(unknownBlock);
if (match != null) {
final String found =
@ -87,8 +89,8 @@ import java.util.stream.IntStream;
}
if (!allowUnsafe) {
for (final PlotBlock block : bucket.getBlocks()) {
if (!block.isAir() && !WorldUtil.IMP.isBlockSolid(block)) {
for (final BlockState block : bucket.getBlocks()) {
if (!block.getBlockType().getMaterial().isAir() && !WorldUtil.IMP.isBlockSolid(block)) {
Captions.NOT_ALLOWED_BLOCK.send(player, block.toString());
return false;
}

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.Location;
import com.github.intellectualsites.plotsquared.plot.object.Plot;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.config.Captions;
import com.github.intellectualsites.plotsquared.plot.object.BlockLoc;

View File

@ -1,5 +1,7 @@
package com.github.intellectualsites.plotsquared.plot.commands;
import com.github.intellectualsites.plotsquared.plot.util.block.BlockUtil;
import com.github.intellectualsites.plotsquared.commands.CommandDeclaration;
import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.config.Captions;

Some files were not shown because too many files have changed in this diff Show More