Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Removed unused classes
Dieser Commit ist enthalten in:
Ursprung
334d5cfaab
Commit
8ee484fca8
@ -1,100 +0,0 @@
|
|||||||
/*
|
|
||||||
* WorldEdit, a Minecraft world manipulation toolkit
|
|
||||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
|
||||||
* Copyright (C) WorldEdit team and contributors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU Lesser General Public License as published by the
|
|
||||||
* Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sk89q.worldedit.blocks;
|
|
||||||
|
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The colors for wool.
|
|
||||||
*
|
|
||||||
* <p>This class may be removed in the future.</p>
|
|
||||||
*/
|
|
||||||
public enum ClothColor {
|
|
||||||
|
|
||||||
WHITE("White", "white"),
|
|
||||||
ORANGE("Orange", "orange"),
|
|
||||||
MAGENTA("Magenta", "magenta"),
|
|
||||||
LIGHT_BLUE("Light blue", "lightblue"),
|
|
||||||
YELLOW("Yellow", "yellow"),
|
|
||||||
LIGHT_GREEN("Light green", "lightgreen"),
|
|
||||||
PINK("Pink", "pink", "lightred"),
|
|
||||||
GRAY("Gray", "grey", "gray"),
|
|
||||||
LIGHT_GRAY("Light gray", "lightgrey", "lightgray"),
|
|
||||||
CYAN("Cyan", "cyan", "turquoise"),
|
|
||||||
PURPLE("Purple", "purple", "violet"),
|
|
||||||
BLUE("Blue", "blue"),
|
|
||||||
BROWN("Brown", "brown", "cocoa", "coffee"),
|
|
||||||
DARK_GREEN("Dark green", "green", "darkgreen", "cactusgreen", "cactigreen"),
|
|
||||||
RED("Red", "red"),
|
|
||||||
BLACK("Black", "black");
|
|
||||||
/**
|
|
||||||
* Stores a map of the names for fast access.
|
|
||||||
*/
|
|
||||||
private static final Map<String, ClothColor> lookup = new HashMap<>();
|
|
||||||
|
|
||||||
private final String name;
|
|
||||||
private final String[] lookupKeys;
|
|
||||||
|
|
||||||
static {
|
|
||||||
for (ClothColor type : EnumSet.allOf(ClothColor.class)) {
|
|
||||||
for (String key : type.lookupKeys) {
|
|
||||||
lookup.put(key, type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct the type.
|
|
||||||
*
|
|
||||||
* @param name the name of the color
|
|
||||||
* @param lookupKeys a name to refer to the color by
|
|
||||||
*/
|
|
||||||
ClothColor(String name, String ... lookupKeys) {
|
|
||||||
this.name = name;
|
|
||||||
this.lookupKeys = lookupKeys;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return type from name. May return null.
|
|
||||||
*
|
|
||||||
* @param name the name of the color
|
|
||||||
* @return a color or null
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
public static ClothColor lookup(String name) {
|
|
||||||
return lookup.get(name.toLowerCase(Locale.ROOT));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get user-friendly item name.
|
|
||||||
*
|
|
||||||
* @return the name
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
* WorldEdit, a Minecraft world manipulation toolkit
|
|
||||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
|
||||||
* Copyright (C) WorldEdit team and contributors
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
|
||||||
* under the terms of the GNU Lesser General Public License as published by the
|
|
||||||
* Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
|
|
||||||
* for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sk89q.worldedit.blocks.metadata;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the possible types of mobs.
|
|
||||||
*/
|
|
||||||
public enum MobType {
|
|
||||||
BAT("Bat"),
|
|
||||||
BLAZE("Blaze"),
|
|
||||||
CAVE_SPIDER("CaveSpider"),
|
|
||||||
CHICKEN("Chicken"),
|
|
||||||
COW("Cow"),
|
|
||||||
CREEPER("Creeper"),
|
|
||||||
ENDERDRAGON("EnderDragon"),
|
|
||||||
ENDERMAN("Enderman"),
|
|
||||||
GHAST("Ghast"),
|
|
||||||
GIANT("Giant"),
|
|
||||||
VILLAGER_GOLEM("VillagerGolem"),
|
|
||||||
HORSE("EntityHorse"),
|
|
||||||
MAGMA_CUBE("LavaSlime"),
|
|
||||||
MOOSHROOM("MushroomCow"),
|
|
||||||
OCELOT("Ozelot"),
|
|
||||||
PIG("Pig"),
|
|
||||||
PIG_ZOMBIE("PigZombie"),
|
|
||||||
SHEEP("Sheep"),
|
|
||||||
SILVERFISH("Silverfish"),
|
|
||||||
SKELETON("Skeleton"),
|
|
||||||
SLIME("Slime"),
|
|
||||||
SNOWMAN("SnowMan"),
|
|
||||||
SPIDER("Spider"),
|
|
||||||
SQUID("Squid"),
|
|
||||||
VILLAGER("Villager"),
|
|
||||||
WITCH("Witch"),
|
|
||||||
WITHER("WitherBoss"),
|
|
||||||
WOLF("Wolf"),
|
|
||||||
ZOMBIE("Zombie");
|
|
||||||
|
|
||||||
private final String name;
|
|
||||||
|
|
||||||
MobType(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -27,7 +27,6 @@ import com.sk89q.worldedit.WorldEditException;
|
|||||||
import com.sk89q.worldedit.blocks.MobSpawnerBlock;
|
import com.sk89q.worldedit.blocks.MobSpawnerBlock;
|
||||||
import com.sk89q.worldedit.blocks.SignBlock;
|
import com.sk89q.worldedit.blocks.SignBlock;
|
||||||
import com.sk89q.worldedit.blocks.SkullBlock;
|
import com.sk89q.worldedit.blocks.SkullBlock;
|
||||||
import com.sk89q.worldedit.blocks.metadata.MobType;
|
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.extension.input.DisallowedUsageException;
|
import com.sk89q.worldedit.extension.input.DisallowedUsageException;
|
||||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||||
@ -335,7 +334,7 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
}
|
}
|
||||||
return new MobSpawnerBlock(state, mobName);
|
return new MobSpawnerBlock(state, mobName);
|
||||||
} else {
|
} else {
|
||||||
return new MobSpawnerBlock(state, MobType.PIG.getName());
|
return new MobSpawnerBlock(state, EntityTypes.PIG.getId());
|
||||||
}
|
}
|
||||||
} else if (blockType == BlockTypes.PLAYER_HEAD || blockType == BlockTypes.PLAYER_WALL_HEAD) {
|
} else if (blockType == BlockTypes.PLAYER_HEAD || blockType == BlockTypes.PLAYER_WALL_HEAD) {
|
||||||
// allow setting type/player/rotation
|
// allow setting type/player/rotation
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren