mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Wth
This commit is contained in:
parent
23d88763d1
commit
0f371f203a
@ -44,60 +44,43 @@ public abstract class PlotWorld {
|
||||
@SuppressWarnings("deprecation")
|
||||
public static ArrayList<Material> BLOCKS = new ArrayList<Material>(Arrays.asList(new Material[]{ACACIA_STAIRS, BEACON, BEDROCK, BIRCH_WOOD_STAIRS, BOOKSHELF, BREWING_STAND, BRICK, BRICK_STAIRS, BURNING_FURNACE, CAKE_BLOCK, CAULDRON, CLAY_BRICK, CLAY, COAL_BLOCK, COAL_ORE, COBBLE_WALL, COBBLESTONE, COBBLESTONE_STAIRS, COMMAND, DARK_OAK_STAIRS, DAYLIGHT_DETECTOR, DIAMOND_ORE, DIAMOND_BLOCK, DIRT, DISPENSER, DROPPER, EMERALD_BLOCK, EMERALD_ORE, ENCHANTMENT_TABLE, ENDER_PORTAL_FRAME, ENDER_STONE, FURNACE, GLOWSTONE, GOLD_ORE, GOLD_BLOCK, GRASS, GRAVEL, GLASS, HARD_CLAY, HAY_BLOCK, HUGE_MUSHROOM_1, HUGE_MUSHROOM_2, IRON_BLOCK, IRON_ORE, JACK_O_LANTERN, JUKEBOX, JUNGLE_WOOD_STAIRS, LAPIS_BLOCK, LAPIS_ORE, LEAVES, LEAVES_2, LOG, LOG_2, MELON_BLOCK, MOB_SPAWNER, MOSSY_COBBLESTONE, MYCEL, NETHER_BRICK, NETHER_BRICK_STAIRS, NETHERRACK, NOTE_BLOCK, OBSIDIAN, PACKED_ICE, PUMPKIN, QUARTZ_BLOCK, QUARTZ_ORE, QUARTZ_STAIRS, REDSTONE_BLOCK, SANDSTONE, SAND,
|
||||
SANDSTONE_STAIRS, SMOOTH_BRICK, SMOOTH_STAIRS, SNOW_BLOCK, SOUL_SAND, SPONGE, SPRUCE_WOOD_STAIRS, STONE, WOOD, WOOD_STAIRS, WORKBENCH, WOOL, getMaterial(44), getMaterial(126)}));
|
||||
|
||||
public boolean AUTO_MERGE;
|
||||
public static boolean AUTO_MERGE_DEFAULT = false;
|
||||
|
||||
public boolean MOB_SPAWNING;
|
||||
public static boolean MOB_SPAWNING_DEFAULT = false;
|
||||
|
||||
public Biome PLOT_BIOME;
|
||||
public static Biome PLOT_BIOME_DEFAULT = Biome.FOREST;
|
||||
|
||||
public boolean PLOT_CHAT;
|
||||
public static boolean PLOT_CHAT_DEFAULT = false;
|
||||
|
||||
public boolean SCHEMATIC_CLAIM_SPECIFY = false;
|
||||
public static boolean SCHEMATIC_CLAIM_SPECIFY_DEFAULT = false;
|
||||
|
||||
public boolean SCHEMATIC_ON_CLAIM;
|
||||
public static boolean SCHEMATIC_ON_CLAIM_DEFAULT = false;
|
||||
|
||||
public String SCHEMATIC_FILE;
|
||||
public static String SCHEMATIC_FILE_DEFAULT = "null";
|
||||
|
||||
public List<String> SCHEMATICS;
|
||||
public static List<String> SCHEMATICS_DEFAULT = null;
|
||||
|
||||
public List<String> DEFAULT_FLAGS;
|
||||
public static List<String> DEFAULT_FLAGS_DEFAULT = new ArrayList<String>();
|
||||
|
||||
public boolean USE_ECONOMY;
|
||||
public static boolean USE_ECONOMY_DEFAULT = false;
|
||||
|
||||
public double PLOT_PRICE;
|
||||
public static double PLOT_PRICE_DEFAULT = 100;
|
||||
|
||||
public double MERGE_PRICE;
|
||||
public static double MERGE_PRICE_DEFAULT = 100;
|
||||
|
||||
public double SELL_PRICE;
|
||||
public static double SELL_PRICE_DEFAULT = 75;
|
||||
|
||||
public boolean PVP;
|
||||
public static boolean PVP_DEFAULT = false;
|
||||
|
||||
public boolean PVE;
|
||||
public static boolean PVE_DEFAULT = false;
|
||||
|
||||
public boolean SPAWN_EGGS;
|
||||
public static boolean SPAWN_EGGS_DEFAULT = false;
|
||||
|
||||
public boolean SPAWN_CUSTOM;
|
||||
public static boolean SPAWN_CUSTOM_DEFAULT = true;
|
||||
|
||||
public boolean SPAWN_BREEDING;
|
||||
public static boolean SPAWN_BREEDING_DEFAULT = false;
|
||||
public boolean AUTO_MERGE;
|
||||
public boolean MOB_SPAWNING;
|
||||
public Biome PLOT_BIOME;
|
||||
public boolean PLOT_CHAT;
|
||||
public boolean SCHEMATIC_CLAIM_SPECIFY = false;
|
||||
public boolean SCHEMATIC_ON_CLAIM;
|
||||
public String SCHEMATIC_FILE;
|
||||
public List<String> SCHEMATICS;
|
||||
public List<String> DEFAULT_FLAGS;
|
||||
public boolean USE_ECONOMY;
|
||||
public double PLOT_PRICE;
|
||||
public double MERGE_PRICE;
|
||||
public double SELL_PRICE;
|
||||
public boolean PVP;
|
||||
public boolean PVE;
|
||||
public boolean SPAWN_EGGS;
|
||||
public boolean SPAWN_CUSTOM;
|
||||
public boolean SPAWN_BREEDING;
|
||||
public String worldname;
|
||||
|
||||
public PlotWorld(final String worldname) {
|
||||
this.worldname = worldname;
|
||||
@ -174,48 +157,6 @@ public abstract class PlotWorld {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saving core plotworld settings
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
public void saveConfiguration(final ConfigurationSection config) {
|
||||
final HashMap<String, Object> options = new HashMap<String, Object>();
|
||||
|
||||
options.put("natural_mob_spawning", PlotWorld.MOB_SPAWNING_DEFAULT);
|
||||
options.put("plot.auto_merge", PlotWorld.AUTO_MERGE_DEFAULT);
|
||||
options.put("plot.biome", PlotWorld.PLOT_BIOME_DEFAULT.toString());
|
||||
options.put("schematic.on_claim", PlotWorld.SCHEMATIC_ON_CLAIM_DEFAULT);
|
||||
options.put("schematic.file", PlotWorld.SCHEMATIC_FILE_DEFAULT);
|
||||
options.put("schematic.specify_on_claim", PlotWorld.SCHEMATIC_CLAIM_SPECIFY_DEFAULT);
|
||||
options.put("schematic.schematics", PlotWorld.SCHEMATICS_DEFAULT);
|
||||
options.put("economy.use", PlotWorld.USE_ECONOMY_DEFAULT);
|
||||
options.put("economy.prices.claim", PlotWorld.PLOT_PRICE_DEFAULT);
|
||||
options.put("economy.prices.merge", PlotWorld.MERGE_PRICE_DEFAULT);
|
||||
options.put("economy.prices.sell", PlotWorld.SELL_PRICE_DEFAULT);
|
||||
options.put("chat.enabled", PlotWorld.PLOT_CHAT_DEFAULT);
|
||||
options.put("flags.default", PlotWorld.DEFAULT_FLAGS_DEFAULT);
|
||||
options.put("event.pvp", PlotWorld.PVP_DEFAULT);
|
||||
options.put("event.pve", PlotWorld.PVE_DEFAULT);
|
||||
options.put("event.spawn.egg", PlotWorld.SPAWN_EGGS_DEFAULT);
|
||||
options.put("event.spawn.custom", PlotWorld.SPAWN_CUSTOM_DEFAULT);
|
||||
options.put("event.spawn.breeding", PlotWorld.SPAWN_BREEDING_DEFAULT);
|
||||
final ConfigurationNode[] settings = getSettingNodes();
|
||||
|
||||
/*
|
||||
* Saving generator specific settings
|
||||
*/
|
||||
for (final ConfigurationNode setting : settings) {
|
||||
options.put(setting.getConstant(), setting.getType().parseObject(setting.getValue()));
|
||||
}
|
||||
|
||||
for (final String option : options.keySet()) {
|
||||
if (!config.contains(option)) {
|
||||
config.set(option, options.get(option));
|
||||
}
|
||||
}
|
||||
} public String worldname;
|
||||
|
||||
/**
|
||||
* Used for the <b>/plot setup</b> command Return null if you do not want to
|
||||
* support this feature
|
||||
|
Loading…
Reference in New Issue
Block a user