From 7dcb4da83b7b4c9dbfbcce48d59882a9885fa31b Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 1 May 2011 13:55:38 -0700 Subject: [PATCH] Moved EntityType to its own class to hopefully fix the unexplainable IllegalAccessErrors. --- src/main/java/com/sk89q/worldedit/EntityType.java | 13 +++++++++++++ src/main/java/com/sk89q/worldedit/LocalWorld.java | 12 ------------ .../com/sk89q/worldedit/bukkit/BukkitWorld.java | 2 +- .../sk89q/worldedit/commands/UtilityCommands.java | 1 - 4 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 src/main/java/com/sk89q/worldedit/EntityType.java diff --git a/src/main/java/com/sk89q/worldedit/EntityType.java b/src/main/java/com/sk89q/worldedit/EntityType.java new file mode 100644 index 000000000..128de27c0 --- /dev/null +++ b/src/main/java/com/sk89q/worldedit/EntityType.java @@ -0,0 +1,13 @@ +package com.sk89q.worldedit; + +/** + * List of removable entity types. + */ +public enum EntityType { + ARROWS, + ITEMS, + PAINTINGS, + BOATS, + MINECARTS, + TNT, +} \ No newline at end of file diff --git a/src/main/java/com/sk89q/worldedit/LocalWorld.java b/src/main/java/com/sk89q/worldedit/LocalWorld.java index 9a6bdf0ac..48725bd87 100644 --- a/src/main/java/com/sk89q/worldedit/LocalWorld.java +++ b/src/main/java/com/sk89q/worldedit/LocalWorld.java @@ -30,18 +30,6 @@ import com.sk89q.worldedit.regions.Region; * @author sk89q */ public abstract class LocalWorld { - /** - * List of removable entity types. - */ - public enum EntityType { - ARROWS, - ITEMS, - PAINTINGS, - BOATS, - MINECARTS, - TNT, - } - /** * Random generator. */ diff --git a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java index 9b32f4d0c..b0df094f5 100644 --- a/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java +++ b/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java @@ -421,7 +421,7 @@ public class BukkitWorld extends LocalWorld { * @return */ @Override - public int removeEntities(EntityType type, Vector origin, int radius) { + public int removeEntities(LocalWorld.EntityType type, Vector origin, int radius) { int num = 0; double radiusSq = Math.pow(radius, 2); diff --git a/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java b/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java index a857e419e..1edb512be 100644 --- a/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/UtilityCommands.java @@ -24,7 +24,6 @@ import com.sk89q.minecraft.util.commands.Command; import com.sk89q.minecraft.util.commands.CommandContext; import com.sk89q.minecraft.util.commands.CommandPermissions; import com.sk89q.worldedit.*; -import com.sk89q.worldedit.LocalWorld.EntityType; import com.sk89q.worldedit.blocks.BaseBlock; import com.sk89q.worldedit.patterns.*; import com.sk89q.worldedit.regions.CuboidRegion;