Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Little bit of formatting
Dieser Commit ist enthalten in:
Ursprung
fb5cb9a7bb
Commit
c931095736
@ -35,6 +35,6 @@ public interface Injector {
|
|||||||
* @throws InstantiationException thrown on injection fault
|
* @throws InstantiationException thrown on injection fault
|
||||||
* @throws InvocationTargetException thrown on injection fault
|
* @throws InvocationTargetException thrown on injection fault
|
||||||
*/
|
*/
|
||||||
public Object getInstance(Class<?> cls) throws InvocationTargetException, IllegalAccessException, InstantiationException;
|
Object getInstance(Class<?> cls) throws InvocationTargetException, IllegalAccessException, InstantiationException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface Logging {
|
public @interface Logging {
|
||||||
|
|
||||||
public enum LogMode {
|
enum LogMode {
|
||||||
/**
|
/**
|
||||||
* Player position
|
* Player position
|
||||||
*/
|
*/
|
||||||
|
@ -151,7 +151,7 @@ public class YAMLNode {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (o == null || !(o instanceof Map)) {
|
if (!(o instanceof Map)) {
|
||||||
// This will override existing configuration data!
|
// This will override existing configuration data!
|
||||||
o = new LinkedHashMap<String, Object>();
|
o = new LinkedHashMap<String, Object>();
|
||||||
node.put(parts[i], o);
|
node.put(parts[i], o);
|
||||||
|
@ -481,10 +481,10 @@ public class WorldEdit {
|
|||||||
int size = missingBlocks.size();
|
int size = missingBlocks.size();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (BlockType id : missingBlocks.keySet()) {
|
for (Map.Entry<BlockType, Integer> blockTypeIntegerEntry : missingBlocks.entrySet()) {
|
||||||
str.append(id.getName());
|
str.append((blockTypeIntegerEntry.getKey()).getName());
|
||||||
|
|
||||||
str.append(" [Amt: ").append(missingBlocks.get(id)).append("]");
|
str.append(" [Amt: ").append(blockTypeIntegerEntry.getValue()).append("]");
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
@ -559,7 +559,7 @@ public class WorldEdit {
|
|||||||
Request.reset();
|
Request.reset();
|
||||||
|
|
||||||
String filename = f.getPath();
|
String filename = f.getPath();
|
||||||
int index = filename.lastIndexOf(".");
|
int index = filename.lastIndexOf('.');
|
||||||
String ext = filename.substring(index + 1);
|
String ext = filename.substring(index + 1);
|
||||||
|
|
||||||
if (!ext.equalsIgnoreCase("js")) {
|
if (!ext.equalsIgnoreCase("js")) {
|
||||||
|
@ -55,7 +55,7 @@ public enum MobType {
|
|||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
|
|
||||||
private MobType(String name) {
|
MobType(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@ import com.sk89q.worldedit.Vector;
|
|||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.extension.platform.Actor;
|
|
||||||
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
import com.sk89q.worldedit.function.block.BlockReplace;
|
import com.sk89q.worldedit.function.block.BlockReplace;
|
||||||
|
@ -27,5 +27,5 @@ import com.sk89q.worldedit.util.Location;
|
|||||||
|
|
||||||
public interface BlockTool extends Tool {
|
public interface BlockTool extends Tool {
|
||||||
|
|
||||||
public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked);
|
boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked);
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,6 @@ import com.sk89q.worldedit.util.Location;
|
|||||||
*/
|
*/
|
||||||
public interface DoubleActionBlockTool extends BlockTool {
|
public interface DoubleActionBlockTool extends BlockTool {
|
||||||
|
|
||||||
public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked);
|
boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session, Location clicked);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,6 @@ import com.sk89q.worldedit.extension.platform.Platform;
|
|||||||
*/
|
*/
|
||||||
public interface DoubleActionTraceTool extends TraceTool {
|
public interface DoubleActionTraceTool extends TraceTool {
|
||||||
|
|
||||||
public boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session);
|
boolean actSecondary(Platform server, LocalConfiguration config, Player player, LocalSession session);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,6 @@ import com.sk89q.worldedit.extension.platform.Platform;
|
|||||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tool that can place (or remove) blocks at a distance.
|
* A tool that can place (or remove) blocks at a distance.
|
||||||
|
@ -34,6 +34,6 @@ public interface Tool {
|
|||||||
* @param actor the actor
|
* @param actor the actor
|
||||||
* @return true if use is permitted
|
* @return true if use is permitted
|
||||||
*/
|
*/
|
||||||
public boolean canUse(Actor actor);
|
boolean canUse(Actor actor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,5 @@ import com.sk89q.worldedit.extension.platform.Platform;
|
|||||||
|
|
||||||
public interface TraceTool extends Tool {
|
public interface TraceTool extends Tool {
|
||||||
|
|
||||||
public boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session);
|
boolean actPrimary(Platform server, LocalConfiguration config, Player player, LocalSession session);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ public interface Brush {
|
|||||||
* @param size the size of the brush
|
* @param size the size of the brush
|
||||||
* @throws MaxChangedBlocksException
|
* @throws MaxChangedBlocksException
|
||||||
*/
|
*/
|
||||||
public void build(EditSession editSession, Vector position, Pattern pattern, double size) throws MaxChangedBlocksException;
|
void build(EditSession editSession, Vector position, Pattern pattern, double size) throws MaxChangedBlocksException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,6 @@ import com.sk89q.jnbt.Tag;
|
|||||||
import com.sk89q.worldedit.BlockVector;
|
import com.sk89q.worldedit.BlockVector;
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
|
||||||
import com.sk89q.worldedit.entity.BaseEntity;
|
import com.sk89q.worldedit.entity.BaseEntity;
|
||||||
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
||||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||||
|
@ -35,7 +35,6 @@ import com.sk89q.worldedit.BlockVector;
|
|||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
|
||||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||||
import com.sk89q.worldedit.extension.input.ParserContext;
|
import com.sk89q.worldedit.extension.input.ParserContext;
|
||||||
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
||||||
|
@ -21,7 +21,6 @@ package com.sk89q.worldedit.extent.inventory;
|
|||||||
|
|
||||||
import com.sk89q.worldedit.util.Location;
|
import com.sk89q.worldedit.util.Location;
|
||||||
import com.sk89q.worldedit.world.block.BlockState;
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a source to get blocks from and store removed ones.
|
* Represents a source to get blocks from and store removed ones.
|
||||||
|
@ -26,7 +26,6 @@ import com.sk89q.worldedit.extent.Extent;
|
|||||||
import com.sk89q.worldedit.world.block.BlockState;
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.block.BlockType;
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -27,7 +27,6 @@ import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
|||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes changes to the world as if a player had done so during survival mode.
|
* Makes changes to the world as if a player had done so during survival mode.
|
||||||
|
@ -34,6 +34,6 @@ public interface EntityFunction {
|
|||||||
* @return true if something was changed
|
* @return true if something was changed
|
||||||
* @throws WorldEditException thrown on an error
|
* @throws WorldEditException thrown on an error
|
||||||
*/
|
*/
|
||||||
public boolean apply(Entity entity) throws WorldEditException;
|
boolean apply(Entity entity) throws WorldEditException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,6 @@ public interface FlatRegionFunction {
|
|||||||
* @return true if something was changed
|
* @return true if something was changed
|
||||||
* @throws WorldEditException thrown on an error
|
* @throws WorldEditException thrown on an error
|
||||||
*/
|
*/
|
||||||
public boolean apply(Vector2D position) throws WorldEditException;
|
boolean apply(Vector2D position) throws WorldEditException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,6 @@ public interface RegionFunction {
|
|||||||
* @return true if something was changed
|
* @return true if something was changed
|
||||||
* @throws WorldEditException thrown on an error
|
* @throws WorldEditException thrown on an error
|
||||||
*/
|
*/
|
||||||
public boolean apply(Vector position) throws WorldEditException;
|
boolean apply(Vector position) throws WorldEditException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ package com.sk89q.worldedit.function.mask;
|
|||||||
|
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
@ -34,6 +34,6 @@ import java.lang.annotation.Target;
|
|||||||
@Target(ElementType.PARAMETER)
|
@Target(ElementType.PARAMETER)
|
||||||
public @interface Direction {
|
public @interface Direction {
|
||||||
|
|
||||||
public static final String AIM = "me";
|
String AIM = "me";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ package com.sk89q.worldedit.internal.cui;
|
|||||||
|
|
||||||
public interface CUIEvent {
|
public interface CUIEvent {
|
||||||
|
|
||||||
public String getTypeId();
|
String getTypeId();
|
||||||
|
|
||||||
public String[] getParameters();
|
String[] getParameters();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ public interface CUIRegion {
|
|||||||
* value supplied by getProtocolVersion().
|
* value supplied by getProtocolVersion().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void describeCUI(LocalSession session, Actor player);
|
void describeCUI(LocalSession session, Actor player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends CUI events describing the region for
|
* Sends CUI events describing the region for
|
||||||
@ -38,7 +38,7 @@ public interface CUIRegion {
|
|||||||
* supplied by getProtocolVersion().
|
* supplied by getProtocolVersion().
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void describeLegacyCUI(LocalSession session, Actor player);
|
void describeLegacyCUI(LocalSession session, Actor player);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the CUI version that is required to send
|
* Returns the CUI version that is required to send
|
||||||
@ -47,14 +47,14 @@ public interface CUIRegion {
|
|||||||
*
|
*
|
||||||
* @return the protocol version
|
* @return the protocol version
|
||||||
*/
|
*/
|
||||||
public int getProtocolVersion();
|
int getProtocolVersion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type ID to send to CUI in the selection event.
|
* Returns the type ID to send to CUI in the selection event.
|
||||||
*
|
*
|
||||||
* @return the type ID
|
* @return the type ID
|
||||||
*/
|
*/
|
||||||
public String getTypeID();
|
String getTypeID();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the type ID to send to CUI in the selection
|
* Returns the type ID to send to CUI in the selection
|
||||||
@ -62,5 +62,5 @@ public interface CUIRegion {
|
|||||||
*
|
*
|
||||||
* @return the legacy type ID
|
* @return the legacy type ID
|
||||||
*/
|
*/
|
||||||
public String getLegacyTypeID();
|
String getLegacyTypeID();
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,8 @@ public interface Identifiable {
|
|||||||
* C - Switch
|
* C - Switch
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public abstract char id();
|
char id();
|
||||||
|
|
||||||
public int getPosition();
|
int getPosition();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,12 +27,12 @@ import com.sk89q.worldedit.internal.expression.parser.ParserException;
|
|||||||
*/
|
*/
|
||||||
public interface LValue extends RValue {
|
public interface LValue extends RValue {
|
||||||
|
|
||||||
public double assign(double value) throws EvaluationException;
|
double assign(double value) throws EvaluationException;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LValue optimize() throws EvaluationException;
|
LValue optimize() throws EvaluationException;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LValue bindVariables(Expression expression, boolean preferLValue) throws ParserException;
|
LValue bindVariables(Expression expression, boolean preferLValue) throws ParserException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,10 @@ import com.sk89q.worldedit.internal.expression.parser.ParserException;
|
|||||||
*/
|
*/
|
||||||
public interface RValue extends Identifiable {
|
public interface RValue extends Identifiable {
|
||||||
|
|
||||||
public double getValue() throws EvaluationException;
|
double getValue() throws EvaluationException;
|
||||||
|
|
||||||
public RValue optimize() throws EvaluationException;
|
RValue optimize() throws EvaluationException;
|
||||||
|
|
||||||
public RValue bindVariables(Expression expression, boolean preferLValue) throws ParserException;
|
RValue bindVariables(Expression expression, boolean preferLValue) throws ParserException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -160,13 +160,13 @@ public final class DocumentationPrinter {
|
|||||||
|
|
||||||
stream.print(" || ");
|
stream.print(" || ");
|
||||||
|
|
||||||
if (cmd.flags() != null && !cmd.flags().equals("")) {
|
if (cmd.flags() != null && !cmd.flags().isEmpty()) {
|
||||||
stream.print(cmd.flags());
|
stream.print(cmd.flags());
|
||||||
}
|
}
|
||||||
|
|
||||||
stream.print(" || ");
|
stream.print(" || ");
|
||||||
|
|
||||||
if (cmd.desc() != null && !cmd.desc().equals("")) {
|
if (cmd.desc() != null && !cmd.desc().isEmpty()) {
|
||||||
stream.print(cmd.desc());
|
stream.print(cmd.desc());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ public interface Interpolation {
|
|||||||
*
|
*
|
||||||
* @param nodes the nodes
|
* @param nodes the nodes
|
||||||
*/
|
*/
|
||||||
public void setNodes(List<Node> nodes);
|
void setNodes(List<Node> nodes);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the result of f(position)
|
* Gets the result of f(position)
|
||||||
@ -44,7 +44,7 @@ public interface Interpolation {
|
|||||||
* @param position the position to interpolate
|
* @param position the position to interpolate
|
||||||
* @return the result
|
* @return the result
|
||||||
*/
|
*/
|
||||||
public Vector getPosition(double position);
|
Vector getPosition(double position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the result of f'(position).
|
* Gets the result of f'(position).
|
||||||
@ -52,7 +52,7 @@ public interface Interpolation {
|
|||||||
* @param position the position to interpolate
|
* @param position the position to interpolate
|
||||||
* @return the result
|
* @return the result
|
||||||
*/
|
*/
|
||||||
public Vector get1stDerivative(double position);
|
Vector get1stDerivative(double position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the result of ∫<sub>a</sub><sup style="position: relative; left: -1ex">b</sup>|f'(t)| dt.<br />
|
* Gets the result of ∫<sub>a</sub><sup style="position: relative; left: -1ex">b</sup>|f'(t)| dt.<br />
|
||||||
|
@ -28,19 +28,19 @@ public interface FlatRegion extends Region {
|
|||||||
*
|
*
|
||||||
* @return the Y value
|
* @return the Y value
|
||||||
*/
|
*/
|
||||||
public int getMinimumY();
|
int getMinimumY();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the maximum Y value
|
* Gets the maximum Y value
|
||||||
*
|
*
|
||||||
* @return the Y value
|
* @return the Y value
|
||||||
*/
|
*/
|
||||||
public int getMaximumY();
|
int getMaximumY();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get this region as an iterable flat region.
|
* Get this region as an iterable flat region.
|
||||||
*
|
*
|
||||||
* @return a flat region iterable
|
* @return a flat region iterable
|
||||||
*/
|
*/
|
||||||
public Iterable<Vector2D> asFlatRegion();
|
Iterable<Vector2D> asFlatRegion();
|
||||||
}
|
}
|
||||||
|
@ -44,14 +44,14 @@ public interface RegionSelector {
|
|||||||
* @return a world, which may be null
|
* @return a world, which may be null
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public World getWorld();
|
World getWorld();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the world for the region selector.
|
* Set the world for the region selector.
|
||||||
*
|
*
|
||||||
* @param world the world, which may be null
|
* @param world the world, which may be null
|
||||||
*/
|
*/
|
||||||
public void setWorld(@Nullable World world);
|
void setWorld(@Nullable World world);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the first point is selected.
|
* Called when the first point is selected.
|
||||||
@ -59,7 +59,7 @@ public interface RegionSelector {
|
|||||||
* @param position the position
|
* @param position the position
|
||||||
* @return true if something changed
|
* @return true if something changed
|
||||||
*/
|
*/
|
||||||
public boolean selectPrimary(Vector position, SelectorLimits limits);
|
boolean selectPrimary(Vector position, SelectorLimits limits);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the second point is selected.
|
* Called when the second point is selected.
|
||||||
@ -67,7 +67,7 @@ public interface RegionSelector {
|
|||||||
* @param position the position
|
* @param position the position
|
||||||
* @return true if something changed
|
* @return true if something changed
|
||||||
*/
|
*/
|
||||||
public boolean selectSecondary(Vector position, SelectorLimits limits);
|
boolean selectSecondary(Vector position, SelectorLimits limits);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell the player information about his/her primary selection.
|
* Tell the player information about his/her primary selection.
|
||||||
@ -76,7 +76,7 @@ public interface RegionSelector {
|
|||||||
* @param session the session
|
* @param session the session
|
||||||
* @param position position
|
* @param position position
|
||||||
*/
|
*/
|
||||||
public void explainPrimarySelection(Actor actor, LocalSession session, Vector position);
|
void explainPrimarySelection(Actor actor, LocalSession session, Vector position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tell the player information about his/her secondary selection.
|
* Tell the player information about his/her secondary selection.
|
||||||
@ -85,7 +85,7 @@ public interface RegionSelector {
|
|||||||
* @param session the session
|
* @param session the session
|
||||||
* @param position position
|
* @param position position
|
||||||
*/
|
*/
|
||||||
public void explainSecondarySelection(Actor actor, LocalSession session, Vector position);
|
void explainSecondarySelection(Actor actor, LocalSession session, Vector position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The the player information about the region's changes. This may resend
|
* The the player information about the region's changes. This may resend
|
||||||
@ -94,7 +94,7 @@ public interface RegionSelector {
|
|||||||
* @param actor the actor
|
* @param actor the actor
|
||||||
* @param session the session
|
* @param session the session
|
||||||
*/
|
*/
|
||||||
public void explainRegionAdjust(Actor actor, LocalSession session);
|
void explainRegionAdjust(Actor actor, LocalSession session);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the primary position.
|
* Get the primary position.
|
||||||
@ -102,7 +102,7 @@ public interface RegionSelector {
|
|||||||
* @return the primary position
|
* @return the primary position
|
||||||
* @throws IncompleteRegionException thrown if a region has not been fully defined
|
* @throws IncompleteRegionException thrown if a region has not been fully defined
|
||||||
*/
|
*/
|
||||||
public BlockVector getPrimaryPosition() throws IncompleteRegionException;
|
BlockVector getPrimaryPosition() throws IncompleteRegionException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the selection.
|
* Get the selection.
|
||||||
@ -110,51 +110,51 @@ public interface RegionSelector {
|
|||||||
* @return the created region
|
* @return the created region
|
||||||
* @throws IncompleteRegionException thrown if a region has not been fully defined
|
* @throws IncompleteRegionException thrown if a region has not been fully defined
|
||||||
*/
|
*/
|
||||||
public Region getRegion() throws IncompleteRegionException;
|
Region getRegion() throws IncompleteRegionException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the region even if it's not fully defined.
|
* Get the region even if it's not fully defined.
|
||||||
*
|
*
|
||||||
* @return an incomplete region object that is incomplete
|
* @return an incomplete region object that is incomplete
|
||||||
*/
|
*/
|
||||||
public Region getIncompleteRegion();
|
Region getIncompleteRegion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the region has been fully defined.
|
* Returns whether the region has been fully defined.
|
||||||
*
|
*
|
||||||
* @return true if a selection is available
|
* @return true if a selection is available
|
||||||
*/
|
*/
|
||||||
public boolean isDefined();
|
boolean isDefined();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the number of blocks inside the region.
|
* Get the number of blocks inside the region.
|
||||||
*
|
*
|
||||||
* @return number of blocks, or -1 if undefined
|
* @return number of blocks, or -1 if undefined
|
||||||
*/
|
*/
|
||||||
public int getArea();
|
int getArea();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the selector with changes to the region.
|
* Update the selector with changes to the region.
|
||||||
*/
|
*/
|
||||||
public void learnChanges();
|
void learnChanges();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear the selection.
|
* Clear the selection.
|
||||||
*/
|
*/
|
||||||
public void clear();
|
void clear();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a lowercase name of this region selector type.
|
* Get a lowercase name of this region selector type.
|
||||||
*
|
*
|
||||||
* @return a lower case name of the type
|
* @return a lower case name of the type
|
||||||
*/
|
*/
|
||||||
public String getTypeName();
|
String getTypeName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get lines of information about the selection.
|
* Get lines of information about the selection.
|
||||||
*
|
*
|
||||||
* @return a list of lines describing the region
|
* @return a list of lines describing the region
|
||||||
*/
|
*/
|
||||||
public List<String> getInformationLines();
|
List<String> getInformationLines();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ public enum RegionSelectorType {
|
|||||||
|
|
||||||
private final Class<? extends RegionSelector> selectorClass;
|
private final Class<? extends RegionSelector> selectorClass;
|
||||||
|
|
||||||
private RegionSelectorType(Class<? extends RegionSelector> selectorClass) {
|
RegionSelectorType(Class<? extends RegionSelector> selectorClass) {
|
||||||
this.selectorClass = selectorClass;
|
this.selectorClass = selectorClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,10 +24,10 @@ import java.util.Map;
|
|||||||
import javax.script.ScriptException;
|
import javax.script.ScriptException;
|
||||||
|
|
||||||
public interface CraftScriptEngine {
|
public interface CraftScriptEngine {
|
||||||
public void setTimeLimit(int milliseconds);
|
void setTimeLimit(int milliseconds);
|
||||||
|
|
||||||
public int getTimeLimit();
|
int getTimeLimit();
|
||||||
|
|
||||||
public Object evaluate(String script, String filename, Map<String, Object> args)
|
Object evaluate(String script, String filename, Map<String, Object> args)
|
||||||
throws ScriptException, Throwable;
|
throws ScriptException, Throwable;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public class SessionManager {
|
|||||||
checkNotNull(name);
|
checkNotNull(name);
|
||||||
for (SessionHolder holder : sessions.values()) {
|
for (SessionHolder holder : sessions.values()) {
|
||||||
String test = holder.key.getName();
|
String test = holder.key.getName();
|
||||||
if (test != null && name.equals(test)) {
|
if (name.equals(test)) {
|
||||||
return holder.session;
|
return holder.session;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ package com.sk89q.worldedit.util;
|
|||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class uses an inefficient method to figure out what block a player
|
* This class uses an inefficient method to figure out what block a player
|
||||||
|
@ -120,7 +120,7 @@ public class YAMLConfiguration extends LocalConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String type = config.getString("shell-save-type", "").trim();
|
String type = config.getString("shell-save-type", "").trim();
|
||||||
shellSaveType = type.equals("") ? null : type;
|
shellSaveType = type.isEmpty() ? null : type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,6 +61,6 @@ public interface Parameter {
|
|||||||
*
|
*
|
||||||
* @return a default value, or null if none is set
|
* @return a default value, or null if none is set
|
||||||
*/
|
*/
|
||||||
public String[] getDefaultValue();
|
String[] getDefaultValue();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -136,11 +136,11 @@ public enum Style {
|
|||||||
private final static Map<Integer, Style> BY_ID = Maps.newHashMap();
|
private final static Map<Integer, Style> BY_ID = Maps.newHashMap();
|
||||||
private final static Map<Character, Style> BY_CHAR = Maps.newHashMap();
|
private final static Map<Character, Style> BY_CHAR = Maps.newHashMap();
|
||||||
|
|
||||||
private Style(char code, int intCode) {
|
Style(char code, int intCode) {
|
||||||
this(code, intCode, false);
|
this(code, intCode, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Style(char code, int intCode, boolean isFormat) {
|
Style(char code, int intCode, boolean isFormat) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
this.intCode = intCode;
|
this.intCode = intCode;
|
||||||
this.isFormat = isFormat;
|
this.isFormat = isFormat;
|
||||||
@ -183,7 +183,7 @@ public enum Style {
|
|||||||
* Gets the color represented by the specified color code
|
* Gets the color represented by the specified color code
|
||||||
*
|
*
|
||||||
* @param code Code to check
|
* @param code Code to check
|
||||||
* @return Associative {@link org.bukkit.ChatColor} with the given code, or null if it doesn't exist
|
* @return Associative Style with the given code, or null if it doesn't exist
|
||||||
*/
|
*/
|
||||||
public static Style getByChar(char code) {
|
public static Style getByChar(char code) {
|
||||||
return BY_CHAR.get(code);
|
return BY_CHAR.get(code);
|
||||||
@ -193,7 +193,7 @@ public enum Style {
|
|||||||
* Gets the color represented by the specified color code
|
* Gets the color represented by the specified color code
|
||||||
*
|
*
|
||||||
* @param code Code to check
|
* @param code Code to check
|
||||||
* @return Associative {@link org.bukkit.ChatColor} with the given code, or null if it doesn't exist
|
* @return Associative Style with the given code, or null if it doesn't exist
|
||||||
*/
|
*/
|
||||||
public static Style getByChar(String code) {
|
public static Style getByChar(String code) {
|
||||||
checkNotNull(code);
|
checkNotNull(code);
|
||||||
|
@ -25,7 +25,6 @@ import com.sk89q.jnbt.CompoundTag;
|
|||||||
import com.sk89q.jnbt.StringTag;
|
import com.sk89q.jnbt.StringTag;
|
||||||
import com.sk89q.jnbt.Tag;
|
import com.sk89q.jnbt.Tag;
|
||||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
||||||
import com.sk89q.worldedit.function.mask.Mask;
|
|
||||||
import com.sk89q.worldedit.registry.state.Property;
|
import com.sk89q.worldedit.registry.state.Property;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -200,7 +200,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||||||
public int compareTo(Snapshot o) {
|
public int compareTo(Snapshot o) {
|
||||||
if (o.date == null || date == null) {
|
if (o.date == null || date == null) {
|
||||||
// Remove the folder from the name
|
// Remove the folder from the name
|
||||||
int i = name.indexOf("/"), j = o.name.indexOf("/");
|
int i = name.indexOf('/'), j = o.name.indexOf('/');
|
||||||
return name.substring((i > 0 ? 0 : i)).compareTo(o.name.substring((j > 0 ? 0 : j)));
|
return name.substring((i > 0 ? 0 : i)).compareTo(o.name.substring((j > 0 ? 0 : j)));
|
||||||
} else {
|
} else {
|
||||||
return date.compareTo(o.date);
|
return date.compareTo(o.date);
|
||||||
|
@ -36,6 +36,6 @@ public interface SnapshotDateParser {
|
|||||||
* @return date or null
|
* @return date or null
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public Calendar detectDate(File file);
|
Calendar detectDate(File file);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ public class TrueZipLegacyChunkStore extends LegacyChunkStore {
|
|||||||
|
|
||||||
// Detect subfolder for the world's files
|
// Detect subfolder for the world's files
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
if (!folder.equals("")) {
|
if (!folder.isEmpty()) {
|
||||||
file = folder + "/" + file;
|
file = folder + "/" + file;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -87,7 +87,7 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
|
|||||||
protected InputStream getInputStream(String name, String worldName) throws IOException, DataException {
|
protected InputStream getInputStream(String name, String worldName) throws IOException, DataException {
|
||||||
// Detect subfolder for the world's files
|
// Detect subfolder for the world's files
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
if (!folder.equals("")) {
|
if (!folder.isEmpty()) {
|
||||||
name = folder + "/" + name;
|
name = folder + "/" + name;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -100,7 +100,7 @@ public class TrueZipMcRegionChunkStore extends McRegionChunkStore {
|
|||||||
if (worldPattern.matcher(worldName).matches()) {
|
if (worldPattern.matcher(worldName).matches()) {
|
||||||
// Check for file
|
// Check for file
|
||||||
if (pattern.matcher(testEntry.getName()).matches()) {
|
if (pattern.matcher(testEntry.getName()).matches()) {
|
||||||
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf("/"));
|
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));
|
||||||
name = folder + "/" + name;
|
name = folder + "/" + name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class ZippedLegacyChunkStore extends LegacyChunkStore {
|
|||||||
|
|
||||||
// Detect subfolder for the world's files
|
// Detect subfolder for the world's files
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
if (!folder.equals("")) {
|
if (!folder.isEmpty()) {
|
||||||
file = folder + "/" + file;
|
file = folder + "/" + file;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -76,7 +76,7 @@ public class ZippedMcRegionChunkStore extends McRegionChunkStore {
|
|||||||
protected InputStream getInputStream(String name, String worldName) throws IOException, DataException {
|
protected InputStream getInputStream(String name, String worldName) throws IOException, DataException {
|
||||||
// Detect subfolder for the world's files
|
// Detect subfolder for the world's files
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
if (!folder.equals("")) {
|
if (!folder.isEmpty()) {
|
||||||
name = folder + "/" + name;
|
name = folder + "/" + name;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -86,7 +86,7 @@ public class ZippedMcRegionChunkStore extends McRegionChunkStore {
|
|||||||
// Check for world
|
// Check for world
|
||||||
if (testEntry.getName().startsWith(worldName + "/")) {
|
if (testEntry.getName().startsWith(worldName + "/")) {
|
||||||
if (pattern.matcher(testEntry.getName()).matches()) { // does entry end in .mca
|
if (pattern.matcher(testEntry.getName()).matches()) { // does entry end in .mca
|
||||||
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf("/"));
|
folder = testEntry.getName().substring(0, testEntry.getName().lastIndexOf('/'));
|
||||||
name = folder + "/" + name;
|
name = folder + "/" + name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren