1.4r1f hotfix
This commit is contained in:
parent
1a8feff15a
commit
f7f033c36d
170 changed files with 5352 additions and 5288 deletions
|
|
@ -1,32 +1,33 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import java.util.Map;
|
||||
import org.gsdistance.grimmsServer.Config.ActiveConfig;
|
||||
import org.gsdistance.grimmsServer.Config.ConfigKey;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class ConfigRequirements {
|
||||
public static final Map<String, String> CommandRequirements = Map.ofEntries(Map.entry("logLeaderboard", "leaderboard"), Map.entry("sendMoney", "market"), Map.entry("makeItemLevelable", "leveling"), Map.entry("setPlayerStat", "stats"), Map.entry("logEnchantmentCosts", "market"), Map.entry("logJobs", "job"), Map.entry("takeJob", "job"), Map.entry("addTitle", "titles"), Map.entry("removeTitle", "titles"), Map.entry("executePlayer", "titles"), Map.entry("withdrawMoney", "market"), Map.entry("depositMoney", "market"), Map.entry("home", "homes"), Map.entry("nick", "chat"), Map.entry("market", "market"), Map.entry("gDim", "dimensions"));
|
||||
public static final Map<String, String> CommandRequirements = Map.ofEntries(Map.entry("logLeaderboard", "leaderboard"), Map.entry("sendMoney", "market"), Map.entry("makeItemLevelable", "leveling"), Map.entry("setPlayerStat", "stats"), Map.entry("logEnchantmentCosts", "market"), Map.entry("logJobs", "job"), Map.entry("takeJob", "job"), Map.entry("addTitle", "titles"), Map.entry("removeTitle", "titles"), Map.entry("executePlayer", "titles"), Map.entry("withdrawMoney", "market"), Map.entry("depositMoney", "market"), Map.entry("home", "homes"), Map.entry("nick", "chat"), Map.entry("market", "market"), Map.entry("gDim", "dimensions"));
|
||||
|
||||
public ConfigRequirements() {
|
||||
}
|
||||
public ConfigRequirements() {
|
||||
}
|
||||
|
||||
public static boolean isCommandEnabled(String command) {
|
||||
return switch ((String)CommandRequirements.getOrDefault(command, "default")) {
|
||||
case "market" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_MARKET, Boolean.class);
|
||||
case "leaderboard" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_LEADERBOARD, Boolean.class);
|
||||
case "job" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_JOBS, Boolean.class);
|
||||
case "stats" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_LEVELING, Boolean.class);
|
||||
case "titles" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_TITLES, Boolean.class);
|
||||
case "chat" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_CHAT, Boolean.class);
|
||||
case "homes" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_HOMES, Boolean.class);
|
||||
case "utils" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_UTILS, Boolean.class);
|
||||
case "ranks" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_RANKS, Boolean.class);
|
||||
case "factions" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_FACTIONS, Boolean.class);
|
||||
case "relics" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_RELICS, Boolean.class);
|
||||
case "events" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_EVENTS, Boolean.class);
|
||||
case "dimensions" -> (Boolean)ActiveConfig.getConfigValue(ConfigKey.MODULE_DIMENSIONS, Boolean.class);
|
||||
case "default" -> true;
|
||||
default -> true;
|
||||
};
|
||||
}
|
||||
public static boolean isCommandEnabled(String command) {
|
||||
return switch (CommandRequirements.getOrDefault(command, "default")) {
|
||||
case "market" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_MARKET, Boolean.class);
|
||||
case "leaderboard" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_LEADERBOARD, Boolean.class);
|
||||
case "job" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_JOBS, Boolean.class);
|
||||
case "stats" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_LEVELING, Boolean.class);
|
||||
case "titles" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_TITLES, Boolean.class);
|
||||
case "chat" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_CHAT, Boolean.class);
|
||||
case "homes" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_HOMES, Boolean.class);
|
||||
case "utils" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_UTILS, Boolean.class);
|
||||
case "ranks" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_RANKS, Boolean.class);
|
||||
case "factions" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_FACTIONS, Boolean.class);
|
||||
case "relics" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_RELICS, Boolean.class);
|
||||
case "events" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_EVENTS, Boolean.class);
|
||||
case "dimensions" -> ActiveConfig.getConfigValue(ConfigKey.MODULE_DIMENSIONS, Boolean.class);
|
||||
case "default" -> true;
|
||||
default -> true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,46 +1,46 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
public enum FactionRank {
|
||||
LEADER("Leader", 4),
|
||||
OFFICER("Officer", 3),
|
||||
MEMBER("Member", 2),
|
||||
RECRUIT("Recruit", 1),
|
||||
NONE("Not a member", 0);
|
||||
LEADER("Leader", 4),
|
||||
OFFICER("Officer", 3),
|
||||
MEMBER("Member", 2),
|
||||
RECRUIT("Recruit", 1),
|
||||
NONE("Not a member", 0);
|
||||
|
||||
private final String displayName;
|
||||
public final Integer weight;
|
||||
private final String displayName;
|
||||
public final Integer weight;
|
||||
|
||||
private FactionRank(String displayName, Integer weight) {
|
||||
this.displayName = displayName;
|
||||
this.weight = weight;
|
||||
}
|
||||
FactionRank(String displayName, Integer weight) {
|
||||
this.displayName = displayName;
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.displayName;
|
||||
}
|
||||
public String toString() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
public static FactionRank fromWeight(int weight) {
|
||||
for(FactionRank rank : values()) {
|
||||
if (rank.weight == weight) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
public static FactionRank fromWeight(int weight) {
|
||||
for (FactionRank rank : values()) {
|
||||
if (rank.weight == weight) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
|
||||
return NONE;
|
||||
}
|
||||
return NONE;
|
||||
}
|
||||
|
||||
public static FactionRank fromString(String name) {
|
||||
for(FactionRank rank : values()) {
|
||||
if (rank.displayName.equalsIgnoreCase(name)) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
public static FactionRank fromString(String name) {
|
||||
for (FactionRank rank : values()) {
|
||||
if (rank.displayName.equalsIgnoreCase(name)) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
|
||||
return NONE;
|
||||
}
|
||||
return NONE;
|
||||
}
|
||||
|
||||
// $FF: synthetic method
|
||||
private static FactionRank[] $values() {
|
||||
return new FactionRank[]{LEADER, OFFICER, MEMBER, RECRUIT, NONE};
|
||||
}
|
||||
// $FF: synthetic method
|
||||
private static FactionRank[] $values() {
|
||||
return new FactionRank[]{LEADER, OFFICER, MEMBER, RECRUIT, NONE};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,17 @@ package org.gsdistance.grimmsServer.Data;
|
|||
import java.util.Map;
|
||||
|
||||
public class HelpStrings {
|
||||
public static final Map<String, String> helpStrings = Map.ofEntries(Map.entry("sendmoney", "Send money to another player"), Map.entry("makeitemlevelable", "Make the item in your hand levelable (costs 3500 money, requires level 10+)"), Map.entry("setplayerstat", "Set a specific stat for a player"), Map.entry("addtitle", "Add a title to a player"), Map.entry("executeplayer", "Execute a player (requires Executioner title)"), Map.entry("grimsservercommands", "List all available GrimmsServer commands"), Map.entry("withdrawmoney", "Withdraw money as physical banknotes (minimum 25 money)"), Map.entry("depositmoney", "Deposit banknotes by holding them in your main hand"), Map.entry("acceptrequest", "Accept a pending request by ID"), Map.entry("removetitle", "Remove a title from a player"), Map.entry("home", "Manage your homes - set, teleport, list, or delete"), Map.entry("nick", "Set your nickname or another player's nickname"), Map.entry("market", "Access the market system for buying, selling, and enchanting"), Map.entry("gutil", "Utility commands for version info, relics, capabilities, and settings"), Map.entry("glog", "View logs for stats, titles, world info, leaderboards, and chunk data"), Map.entry("gdim", "Dimension management - create, delete, teleport, list, and get info"), Map.entry("gfaction", "Faction management - invite, join, leave, kick, claim, and manage ranks"), Map.entry("gconfig", "Configuration management - dump config or reload settings"), Map.entry("job", "Job system - log jobs, take jobs, or buy education"), Map.entry("ghelp", "Get help for GrimmsServer commands"));
|
||||
public static final Map<String, String> helpUsages = Map.ofEntries(Map.entry("sendmoney", "/sendmoney <player> <amount>"), Map.entry("makeitemlevelable", "/makeitemlevelable"), Map.entry("setplayerstat", "/setplayerstat <player> <stat> <value>"), Map.entry("addtitle", "/addtitle <player> <title>"), Map.entry("executeplayer", "/executeplayer <player>"), Map.entry("grimsservercommands", "/grimsservercommands"), Map.entry("withdrawmoney", "/withdrawmoney <amount> [count]"), Map.entry("depositmoney", "/depositmoney"), Map.entry("acceptrequest", "/acceptrequest <request_id>"), Map.entry("removetitle", "/removetitle <player> <title>"), Map.entry("home", "/home <sethome|tp|homes|delhome> [args...]"), Map.entry("nick", "/nick <nickname> OR /nick <player> <nickname>"), Map.entry("market", "/market <get|stock|ripoff|enchant|tp|sell|sellall|buy|enchcosts|info> [args...]"), Map.entry("gutil", "/gutil <version|relic|capability|setting> [args...]"), Map.entry("glog", "/glog <self_stats|other_stats|self_titles|other_titles|world|leaderboard|commands|chunk> [args...]"), Map.entry("gdim", "/gdim <create|delete|tp|list|info> [args...]"), Map.entry("gfaction", "/gfaction <invite|join|leave|kick|info|new|claim|unclaim|setrank|unclaimall> [args...]"), Map.entry("gconfig", "/gconfig <dump|reload>"), Map.entry("job", "/job <log|take|buyedu> [args...]"), Map.entry("ghelp", "/ghelp <command>"));
|
||||
public static final Map<String, String> helpStrings = Map.ofEntries(Map.entry("sendmoney", "Send money to another player"), Map.entry("makeitemlevelable", "Make the item in your hand levelable (costs 3500 money, requires level 10+)"), Map.entry("setplayerstat", "Set a specific stat for a player"), Map.entry("addtitle", "Add a title to a player"), Map.entry("executeplayer", "Execute a player (requires Executioner title)"), Map.entry("grimsservercommands", "List all available GrimmsServer commands"), Map.entry("withdrawmoney", "Withdraw money as physical banknotes (minimum 25 money)"), Map.entry("depositmoney", "Deposit banknotes by holding them in your main hand"), Map.entry("acceptrequest", "Accept a pending request by ID"), Map.entry("removetitle", "Remove a title from a player"), Map.entry("home", "Manage your homes - set, teleport, list, or delete"), Map.entry("nick", "Set your nickname or another player's nickname"), Map.entry("market", "Access the market system for buying, selling, and enchanting"), Map.entry("gutil", "Utility commands for version info, relics, capabilities, and settings"), Map.entry("glog", "View logs for stats, titles, world info, leaderboards, and chunk data"), Map.entry("gdim", "Dimension management - create, delete, teleport, list, and get info"), Map.entry("gfaction", "Faction management - invite, join, leave, kick, claim, and manage ranks"), Map.entry("gconfig", "Configuration management - dump config or reload settings"), Map.entry("job", "Job system - log jobs, take jobs, or buy education"), Map.entry("ghelp", "Get help for GrimmsServer commands"));
|
||||
public static final Map<String, String> helpUsages = Map.ofEntries(Map.entry("sendmoney", "/sendmoney <player> <amount>"), Map.entry("makeitemlevelable", "/makeitemlevelable"), Map.entry("setplayerstat", "/setplayerstat <player> <stat> <value>"), Map.entry("addtitle", "/addtitle <player> <title>"), Map.entry("executeplayer", "/executeplayer <player>"), Map.entry("grimsservercommands", "/grimsservercommands"), Map.entry("withdrawmoney", "/withdrawmoney <amount> [count]"), Map.entry("depositmoney", "/depositmoney"), Map.entry("acceptrequest", "/acceptrequest <request_id>"), Map.entry("removetitle", "/removetitle <player> <title>"), Map.entry("home", "/home <sethome|tp|homes|delhome> [args...]"), Map.entry("nick", "/nick <nickname> OR /nick <player> <nickname>"), Map.entry("market", "/market <get|stock|ripoff|enchant|tp|sell|sellall|buy|enchcosts|info> [args...]"), Map.entry("gutil", "/gutil <version|relic|capability|setting> [args...]"), Map.entry("glog", "/glog <self_stats|other_stats|self_titles|other_titles|world|leaderboard|commands|chunk> [args...]"), Map.entry("gdim", "/gdim <create|delete|tp|list|info> [args...]"), Map.entry("gfaction", "/gfaction <invite|join|leave|kick|info|new|claim|unclaim|setrank|unclaimall> [args...]"), Map.entry("gconfig", "/gconfig <dump|reload>"), Map.entry("job", "/job <log|take|buyedu> [args...]"), Map.entry("ghelp", "/ghelp <command>"));
|
||||
|
||||
public HelpStrings() {
|
||||
}
|
||||
public HelpStrings() {
|
||||
}
|
||||
|
||||
public static String getHelpString(String commandName) {
|
||||
return (String)helpStrings.getOrDefault(commandName.toLowerCase(), "Not found.");
|
||||
}
|
||||
public static String getHelpString(String commandName) {
|
||||
return helpStrings.getOrDefault(commandName.toLowerCase(), "Not found.");
|
||||
}
|
||||
|
||||
public static String getHelpUsage(String commandName) {
|
||||
return (String)helpUsages.getOrDefault(commandName.toLowerCase(), "Not found.");
|
||||
}
|
||||
public static String getHelpUsage(String commandName) {
|
||||
return helpUsages.getOrDefault(commandName.toLowerCase(), "Not found.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import java.util.Map;
|
||||
import org.gsdistance.grimmsServer.Constructable.JobTitle;
|
||||
import org.gsdistance.grimmsServer.Stats.PlayerTitles;
|
||||
|
||||
public class JobTitlesBaseValues {
|
||||
public static final Map<String, JobTitle> jobTitleBaseValues = Map.ofEntries(Map.entry("dictator", new JobTitle("Dictator", "Dictator of a dictatorship. Requires title 'Dictator'", 95, (double)50000.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Dictator"))), Map.entry("executioner", new JobTitle("Executioner", "Executioner, self explanatory. Requires title 'Executioner'", 65, (double)8500.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Executioner"))), Map.entry("", new JobTitle("None", "No Job", -1, (double)0.0F, (player) -> true)), Map.entry("miner", new JobTitle("Miner", "Minin' for a quick buck, requires title 'Miner'", -1, (double)750.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Miner"))), Map.entry("farmer", new JobTitle("Farmer", "Farming, but inefficiently.", 60, (double)650.0F, (player) -> true)), Map.entry("hitman", new JobTitle("Hitman", "Killing as a job? Right away! Requires title 'Hitman'", 75, (double)17500.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Hitman"))), Map.entry("ceo", new JobTitle("CEO", "Makin money while laying back, the best life! Requires title 'Millionaire'", 80, (double)11500.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Millionaire"))));
|
||||
import java.util.Map;
|
||||
|
||||
public JobTitlesBaseValues() {
|
||||
}
|
||||
public class JobTitlesBaseValues {
|
||||
public static final Map<String, JobTitle> jobTitleBaseValues = Map.ofEntries(Map.entry("dictator", new JobTitle("Dictator", "Dictator of a dictatorship. Requires title 'Dictator'", 95, 50000.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Dictator"))), Map.entry("executioner", new JobTitle("Executioner", "Executioner, self explanatory. Requires title 'Executioner'", 65, 8500.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Executioner"))), Map.entry("", new JobTitle("None", "No Job", -1, 0.0F, (player) -> true)), Map.entry("miner", new JobTitle("Miner", "Minin' for a quick buck, requires title 'Miner'", -1, 750.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Miner"))), Map.entry("farmer", new JobTitle("Farmer", "Farming, but inefficiently.", 60, 650.0F, (player) -> true)), Map.entry("hitman", new JobTitle("Hitman", "Killing as a job? Right away! Requires title 'Hitman'", 75, 17500.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Hitman"))), Map.entry("ceo", new JobTitle("CEO", "Makin money while laying back, the best life! Requires title 'Millionaire'", 80, 11500.0F, (player) -> PlayerTitles.getPlayerTitles(player).hasTitle("Millionaire"))));
|
||||
|
||||
public JobTitlesBaseValues() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
package org.gsdistance.grimmsServer.Data.Market;
|
||||
|
||||
import java.util.Map;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class EnchantBaseValues {
|
||||
public static final Map<Enchantment, Double> enchantBaseValues;
|
||||
public static final Map<Enchantment, Double> enchantBaseValues;
|
||||
|
||||
public EnchantBaseValues() {
|
||||
}
|
||||
public EnchantBaseValues() {
|
||||
}
|
||||
|
||||
static {
|
||||
enchantBaseValues = Map.ofEntries(Map.entry(Enchantment.SHARPNESS, (double)3000.0F), Map.entry(Enchantment.EFFICIENCY, (double)3500.0F), Map.entry(Enchantment.KNOCKBACK, (double)2000.0F), Map.entry(Enchantment.BANE_OF_ARTHROPODS, (double)2500.0F), Map.entry(Enchantment.SMITE, (double)2500.0F), Map.entry(Enchantment.BINDING_CURSE, (double)10000.0F), Map.entry(Enchantment.VANISHING_CURSE, (double)10000.0F), Map.entry(Enchantment.PROTECTION, (double)3500.0F), Map.entry(Enchantment.BLAST_PROTECTION, (double)2500.0F), Map.entry(Enchantment.PROJECTILE_PROTECTION, (double)2500.0F), Map.entry(Enchantment.FIRE_PROTECTION, (double)2500.0F), Map.entry(Enchantment.SWIFT_SNEAK, (double)2000.0F), Map.entry(Enchantment.BREACH, (double)5000.0F), Map.entry(Enchantment.DENSITY, (double)5000.0F), Map.entry(Enchantment.MENDING, (double)12500.0F), Map.entry(Enchantment.FEATHER_FALLING, (double)2500.0F), Map.entry(Enchantment.RESPIRATION, (double)4750.0F), Map.entry(Enchantment.AQUA_AFFINITY, (double)3000.0F), Map.entry(Enchantment.THORNS, (double)5000.0F), Map.entry(Enchantment.DEPTH_STRIDER, (double)4000.0F), Map.entry(Enchantment.FROST_WALKER, (double)3500.0F), Map.entry(Enchantment.FIRE_ASPECT, (double)4000.0F), Map.entry(Enchantment.LOOTING, (double)4000.0F), Map.entry(Enchantment.SWEEPING_EDGE, (double)4500.0F), Map.entry(Enchantment.SILK_TOUCH, (double)5000.0F), Map.entry(Enchantment.UNBREAKING, (double)4000.0F), Map.entry(Enchantment.FORTUNE, (double)5500.0F), Map.entry(Enchantment.POWER, (double)4500.0F), Map.entry(Enchantment.PUNCH, (double)2000.0F), Map.entry(Enchantment.FLAME, (double)4000.0F), Map.entry(Enchantment.INFINITY, (double)9000.0F), Map.entry(Enchantment.LUCK_OF_THE_SEA, (double)3500.0F), Map.entry(Enchantment.LURE, (double)4500.0F), Map.entry(Enchantment.LOYALTY, (double)6000.0F), Map.entry(Enchantment.IMPALING, (double)2500.0F), Map.entry(Enchantment.RIPTIDE, (double)6000.0F), Map.entry(Enchantment.CHANNELING, (double)6000.0F), Map.entry(Enchantment.MULTISHOT, (double)4500.0F), Map.entry(Enchantment.QUICK_CHARGE, (double)4000.0F), Map.entry(Enchantment.PIERCING, (double)5000.0F), Map.entry(Enchantment.WIND_BURST, (double)5000.0F), Map.entry(Enchantment.SOUL_SPEED, (double)3000.0F));
|
||||
}
|
||||
static {
|
||||
enchantBaseValues = Map.ofEntries(Map.entry(Enchantment.SHARPNESS, (double) 3000.0F), Map.entry(Enchantment.EFFICIENCY, (double) 3500.0F), Map.entry(Enchantment.KNOCKBACK, (double) 2000.0F), Map.entry(Enchantment.BANE_OF_ARTHROPODS, (double) 2500.0F), Map.entry(Enchantment.SMITE, (double) 2500.0F), Map.entry(Enchantment.BINDING_CURSE, (double) 10000.0F), Map.entry(Enchantment.VANISHING_CURSE, (double) 10000.0F), Map.entry(Enchantment.PROTECTION, (double) 3500.0F), Map.entry(Enchantment.BLAST_PROTECTION, (double) 2500.0F), Map.entry(Enchantment.PROJECTILE_PROTECTION, (double) 2500.0F), Map.entry(Enchantment.FIRE_PROTECTION, (double) 2500.0F), Map.entry(Enchantment.SWIFT_SNEAK, (double) 2000.0F), Map.entry(Enchantment.BREACH, (double) 5000.0F), Map.entry(Enchantment.DENSITY, (double) 5000.0F), Map.entry(Enchantment.MENDING, (double) 12500.0F), Map.entry(Enchantment.FEATHER_FALLING, (double) 2500.0F), Map.entry(Enchantment.RESPIRATION, (double) 4750.0F), Map.entry(Enchantment.AQUA_AFFINITY, (double) 3000.0F), Map.entry(Enchantment.THORNS, (double) 5000.0F), Map.entry(Enchantment.DEPTH_STRIDER, (double) 4000.0F), Map.entry(Enchantment.FROST_WALKER, (double) 3500.0F), Map.entry(Enchantment.FIRE_ASPECT, (double) 4000.0F), Map.entry(Enchantment.LOOTING, (double) 4000.0F), Map.entry(Enchantment.SWEEPING_EDGE, (double) 4500.0F), Map.entry(Enchantment.SILK_TOUCH, (double) 5000.0F), Map.entry(Enchantment.UNBREAKING, (double) 4000.0F), Map.entry(Enchantment.FORTUNE, (double) 5500.0F), Map.entry(Enchantment.POWER, (double) 4500.0F), Map.entry(Enchantment.PUNCH, (double) 2000.0F), Map.entry(Enchantment.FLAME, (double) 4000.0F), Map.entry(Enchantment.INFINITY, (double) 9000.0F), Map.entry(Enchantment.LUCK_OF_THE_SEA, (double) 3500.0F), Map.entry(Enchantment.LURE, (double) 4500.0F), Map.entry(Enchantment.LOYALTY, (double) 6000.0F), Map.entry(Enchantment.IMPALING, (double) 2500.0F), Map.entry(Enchantment.RIPTIDE, (double) 6000.0F), Map.entry(Enchantment.CHANNELING, (double) 6000.0F), Map.entry(Enchantment.MULTISHOT, (double) 4500.0F), Map.entry(Enchantment.QUICK_CHARGE, (double) 4000.0F), Map.entry(Enchantment.PIERCING, (double) 5000.0F), Map.entry(Enchantment.WIND_BURST, (double) 5000.0F), Map.entry(Enchantment.SOUL_SPEED, (double) 3000.0F));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,267 +1,268 @@
|
|||
package org.gsdistance.grimmsServer.Data.Market;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.bukkit.Material;
|
||||
|
||||
public class MarketBaseValues {
|
||||
public static Map<Material, Double> marketBaseValues = new HashMap();
|
||||
public static Map<Material, Double> marketBaseValues = new HashMap();
|
||||
|
||||
public MarketBaseValues() {
|
||||
}
|
||||
public MarketBaseValues() {
|
||||
}
|
||||
|
||||
static {
|
||||
marketBaseValues.put(Material.DRAGON_EGG, (double)250000.0F);
|
||||
marketBaseValues.put(Material.DIAMOND, (double)100.0F);
|
||||
marketBaseValues.put(Material.GOLD_INGOT, (double)50.0F);
|
||||
marketBaseValues.put(Material.IRON_INGOT, (double)25.0F);
|
||||
marketBaseValues.put(Material.COAL, (double)10.0F);
|
||||
marketBaseValues.put(Material.EMERALD, (double)75.0F);
|
||||
marketBaseValues.put(Material.REDSTONE, (double)5.0F);
|
||||
marketBaseValues.put(Material.LAPIS_LAZULI, (double)15.0F);
|
||||
marketBaseValues.put(Material.NETHERITE_INGOT, (double)1500.0F);
|
||||
marketBaseValues.put(Material.STONE, (double)1.5F);
|
||||
marketBaseValues.put(Material.GRANITE, (double)1.0F);
|
||||
marketBaseValues.put(Material.DIORITE, (double)1.0F);
|
||||
marketBaseValues.put(Material.ANDESITE, (double)1.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE, (double)1.5F);
|
||||
marketBaseValues.put(Material.COBBLED_DEEPSLATE, (double)1.0F);
|
||||
marketBaseValues.put(Material.CALCITE, (double)5.0F);
|
||||
marketBaseValues.put(Material.TUFF, (double)4.0F);
|
||||
marketBaseValues.put(Material.DRIPSTONE_BLOCK, (double)6.0F);
|
||||
marketBaseValues.put(Material.GRASS_BLOCK, (double)2.0F);
|
||||
marketBaseValues.put(Material.DIRT, (double)1.0F);
|
||||
marketBaseValues.put(Material.COARSE_DIRT, (double)1.5F);
|
||||
marketBaseValues.put(Material.PODZOL, (double)2.0F);
|
||||
marketBaseValues.put(Material.ROOTED_DIRT, (double)1.5F);
|
||||
marketBaseValues.put(Material.MUD, (double)1.5F);
|
||||
marketBaseValues.put(Material.CRIMSON_NYLIUM, (double)2.5F);
|
||||
marketBaseValues.put(Material.WARPED_NYLIUM, (double)2.5F);
|
||||
marketBaseValues.put(Material.COBBLESTONE, (double)1.0F);
|
||||
marketBaseValues.put(Material.OAK_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.SPRUCE_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.BIRCH_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.JUNGLE_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.ACACIA_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.CHERRY_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.DARK_OAK_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.MANGROVE_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.BAMBOO_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.CRIMSON_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.WARPED_PLANKS, (double)0.25F);
|
||||
marketBaseValues.put(Material.BAMBOO_MOSAIC, (double)0.25F);
|
||||
marketBaseValues.put(Material.OAK_SAPLING, (double)4.0F);
|
||||
marketBaseValues.put(Material.BIRCH_SAPLING, (double)4.0F);
|
||||
marketBaseValues.put(Material.JUNGLE_SAPLING, (double)4.0F);
|
||||
marketBaseValues.put(Material.ACACIA_SAPLING, (double)4.0F);
|
||||
marketBaseValues.put(Material.CHERRY_SAPLING, (double)4.0F);
|
||||
marketBaseValues.put(Material.DARK_OAK_SAPLING, (double)4.0F);
|
||||
marketBaseValues.put(Material.MANGROVE_PROPAGULE, (double)4.0F);
|
||||
marketBaseValues.put(Material.SAND, (double)1.0F);
|
||||
marketBaseValues.put(Material.SUSPICIOUS_SAND, (double)125.0F);
|
||||
marketBaseValues.put(Material.SUSPICIOUS_GRAVEL, (double)125.0F);
|
||||
marketBaseValues.put(Material.RED_SAND, (double)1.0F);
|
||||
marketBaseValues.put(Material.GRAVEL, (double)1.0F);
|
||||
marketBaseValues.put(Material.COAL_ORE, (double)10.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_COAL_ORE, (double)10.0F);
|
||||
marketBaseValues.put(Material.IRON_ORE, (double)25.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_IRON_ORE, (double)25.0F);
|
||||
marketBaseValues.put(Material.COPPER_ORE, (double)7.5F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_COPPER_ORE, (double)7.5F);
|
||||
marketBaseValues.put(Material.GOLD_ORE, (double)50.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_GOLD_ORE, (double)50.0F);
|
||||
marketBaseValues.put(Material.REDSTONE_ORE, (double)5.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_REDSTONE_ORE, (double)5.0F);
|
||||
marketBaseValues.put(Material.EMERALD_ORE, (double)75.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_EMERALD_ORE, (double)75.0F);
|
||||
marketBaseValues.put(Material.LAPIS_ORE, (double)15.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_LAPIS_ORE, (double)15.0F);
|
||||
marketBaseValues.put(Material.DIAMOND_ORE, (double)100.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_DIAMOND_ORE, (double)100.0F);
|
||||
marketBaseValues.put(Material.NETHER_GOLD_ORE, (double)25.0F);
|
||||
marketBaseValues.put(Material.NETHER_QUARTZ_ORE, (double)10.0F);
|
||||
marketBaseValues.put(Material.ANCIENT_DEBRIS, (double)325.0F);
|
||||
marketBaseValues.put(Material.EXPOSED_COPPER, (double)67.5F);
|
||||
marketBaseValues.put(Material.WEATHERED_COPPER, (double)67.5F);
|
||||
marketBaseValues.put(Material.OXIDIZED_COPPER, (double)67.5F);
|
||||
marketBaseValues.put(Material.WAXED_COPPER_BLOCK, (double)66.5F);
|
||||
marketBaseValues.put(Material.WAXED_EXPOSED_COPPER, (double)66.5F);
|
||||
marketBaseValues.put(Material.WAXED_WEATHERED_COPPER, (double)66.5F);
|
||||
marketBaseValues.put(Material.WAXED_OXIDIZED_COPPER, (double)66.5F);
|
||||
marketBaseValues.put(Material.OAK_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.SPRUCE_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.BIRCH_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.JUNGLE_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.ACACIA_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.CHERRY_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.DARK_OAK_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.MANGROVE_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.MANGROVE_ROOTS, (double)1.0F);
|
||||
marketBaseValues.put(Material.MUDDY_MANGROVE_ROOTS, (double)1.0F);
|
||||
marketBaseValues.put(Material.CRIMSON_STEM, (double)3.0F);
|
||||
marketBaseValues.put(Material.WARPED_STEM, (double)3.0F);
|
||||
marketBaseValues.put(Material.BAMBOO_BLOCK, 0.8);
|
||||
marketBaseValues.put(Material.STRIPPED_OAK_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_SPRUCE_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_BIRCH_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_JUNGLE_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_ACACIA_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_CHERRY_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_DARK_OAK_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_MANGROVE_LOG, (double)1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_CRIMSON_STEM, (double)3.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_WARPED_STEM, (double)3.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_OAK_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_SPRUCE_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_BIRCH_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_JUNGLE_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_ACACIA_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_CHERRY_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_DARK_OAK_WOOD, (double)1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_CRIMSON_HYPHAE, (double)3.75F);
|
||||
marketBaseValues.put(Material.STRIPPED_WARPED_HYPHAE, (double)3.75F);
|
||||
marketBaseValues.put(Material.STRIPPED_BAMBOO_BLOCK, (double)1.0F);
|
||||
marketBaseValues.put(Material.OAK_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.SPRUCE_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.BIRCH_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.JUNGLE_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.ACACIA_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.CHERRY_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.DARK_OAK_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.MANGROVE_WOOD, (double)0.25F);
|
||||
marketBaseValues.put(Material.CRIMSON_HYPHAE, (double)0.75F);
|
||||
marketBaseValues.put(Material.WARPED_HYPHAE, (double)0.75F);
|
||||
marketBaseValues.put(Material.OAK_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.SPRUCE_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.BIRCH_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.JUNGLE_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.ACACIA_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.CHERRY_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.DARK_OAK_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.MANGROVE_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.AZALEA_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.FLOWERING_AZALEA_LEAVES, (double)0.5F);
|
||||
marketBaseValues.put(Material.SPONGE, (double)10.0F);
|
||||
marketBaseValues.put(Material.WET_SPONGE, (double)10.0F);
|
||||
marketBaseValues.put(Material.GLASS, (double)1.25F);
|
||||
marketBaseValues.put(Material.TINTED_GLASS, (double)2.5F);
|
||||
marketBaseValues.put(Material.LAPIS_BLOCK, (double)135.0F);
|
||||
marketBaseValues.put(Material.SANDSTONE, (double)1.5F);
|
||||
marketBaseValues.put(Material.CHISELED_SANDSTONE, (double)1.5F);
|
||||
marketBaseValues.put(Material.CUT_SANDSTONE, (double)1.5F);
|
||||
marketBaseValues.put(Material.COBWEB, (double)4.0F);
|
||||
marketBaseValues.put(Material.SHORT_GRASS, (double)1.0F);
|
||||
marketBaseValues.put(Material.FERN, (double)2.5F);
|
||||
marketBaseValues.put(Material.AZALEA, (double)2.5F);
|
||||
marketBaseValues.put(Material.FLOWERING_AZALEA, (double)3.0F);
|
||||
marketBaseValues.put(Material.DEAD_BUSH, (double)1.0F);
|
||||
marketBaseValues.put(Material.SEAGRASS, (double)10.0F);
|
||||
marketBaseValues.put(Material.SEA_PICKLE, (double)3.0F);
|
||||
marketBaseValues.put(Material.WHITE_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.ORANGE_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.MAGENTA_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.LIGHT_BLUE_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.YELLOW_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.LIME_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.PINK_WOOL, (double)4.0F);
|
||||
marketBaseValues.put(Material.GRAY_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.LIGHT_GRAY_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.CYAN_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.PURPLE_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.BLUE_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.BROWN_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.GREEN_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.RED_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.BLACK_WOOL, (double)3.5F);
|
||||
marketBaseValues.put(Material.DANDELION, (double)3.0F);
|
||||
marketBaseValues.put(Material.POPPY, (double)3.0F);
|
||||
marketBaseValues.put(Material.BLUE_ORCHID, (double)3.0F);
|
||||
marketBaseValues.put(Material.ALLIUM, (double)3.0F);
|
||||
marketBaseValues.put(Material.AZURE_BLUET, (double)3.0F);
|
||||
marketBaseValues.put(Material.RED_TULIP, (double)3.0F);
|
||||
marketBaseValues.put(Material.ORANGE_TULIP, (double)3.0F);
|
||||
marketBaseValues.put(Material.WHITE_TULIP, (double)3.0F);
|
||||
marketBaseValues.put(Material.PINK_TULIP, (double)3.0F);
|
||||
marketBaseValues.put(Material.OXEYE_DAISY, (double)3.0F);
|
||||
marketBaseValues.put(Material.CORNFLOWER, (double)3.0F);
|
||||
marketBaseValues.put(Material.LILY_OF_THE_VALLEY, (double)3.0F);
|
||||
marketBaseValues.put(Material.WITHER_ROSE, (double)3.0F);
|
||||
marketBaseValues.put(Material.TORCHFLOWER, (double)3.0F);
|
||||
marketBaseValues.put(Material.PITCHER_PLANT, (double)3.0F);
|
||||
marketBaseValues.put(Material.SPORE_BLOSSOM, (double)3.0F);
|
||||
marketBaseValues.put(Material.BROWN_MUSHROOM, (double)10.0F);
|
||||
marketBaseValues.put(Material.RED_MUSHROOM, (double)10.0F);
|
||||
marketBaseValues.put(Material.CRIMSON_FUNGUS, (double)10.0F);
|
||||
marketBaseValues.put(Material.WARPED_FUNGUS, (double)10.0F);
|
||||
marketBaseValues.put(Material.CRIMSON_ROOTS, (double)10.0F);
|
||||
marketBaseValues.put(Material.WARPED_ROOTS, (double)10.0F);
|
||||
marketBaseValues.put(Material.NETHER_SPROUTS, (double)5.0F);
|
||||
marketBaseValues.put(Material.WEEPING_VINES, (double)4.0F);
|
||||
marketBaseValues.put(Material.TWISTING_VINES, (double)4.0F);
|
||||
marketBaseValues.put(Material.SUGAR_CANE, (double)7.0F);
|
||||
marketBaseValues.put(Material.KELP, (double)1.5F);
|
||||
marketBaseValues.put(Material.MOSS_CARPET, (double)1.0F);
|
||||
marketBaseValues.put(Material.PINK_PETALS, (double)1.5F);
|
||||
marketBaseValues.put(Material.MOSS_BLOCK, (double)1.0F);
|
||||
marketBaseValues.put(Material.HANGING_ROOTS, (double)1.0F);
|
||||
marketBaseValues.put(Material.BIG_DRIPLEAF, (double)2.0F);
|
||||
marketBaseValues.put(Material.SMALL_DRIPLEAF, (double)1.5F);
|
||||
marketBaseValues.put(Material.BAMBOO, 0.2);
|
||||
marketBaseValues.put(Material.OAK_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.SPRUCE_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.BIRCH_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.JUNGLE_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.ACACIA_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.CHERRY_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.DARK_OAK_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.MANGROVE_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.BAMBOO_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.BAMBOO_MOSAIC_SLAB, (double)0.125F);
|
||||
marketBaseValues.put(Material.CRIMSON_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.WARPED_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.STONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.SMOOTH_STONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.SANDSTONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.CUT_SANDSTONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.PETRIFIED_OAK_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.COBBLESTONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.BRICK_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.STONE_BRICK_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.MUD_BRICK_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.NETHER_BRICK_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.QUARTZ_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.RED_SANDSTONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.CUT_RED_SANDSTONE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.PURPUR_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.PRISMARINE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.PRISMARINE_BRICK_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.DARK_PRISMARINE_SLAB, (double)0.25F);
|
||||
marketBaseValues.put(Material.SMOOTH_QUARTZ, (double)5.0F);
|
||||
marketBaseValues.put(Material.SMOOTH_RED_SANDSTONE, (double)1.0F);
|
||||
marketBaseValues.put(Material.SMOOTH_SANDSTONE, (double)1.0F);
|
||||
marketBaseValues.put(Material.SMOOTH_STONE, (double)1.0F);
|
||||
marketBaseValues.put(Material.BRICKS, (double)1.0F);
|
||||
marketBaseValues.put(Material.BOOKSHELF, (double)3.0F);
|
||||
marketBaseValues.put(Material.CHISELED_BOOKSHELF, (double)3.0F);
|
||||
marketBaseValues.put(Material.DECORATED_POT, (double)1.5F);
|
||||
marketBaseValues.put(Material.MOSSY_COBBLESTONE, (double)1.0F);
|
||||
marketBaseValues.put(Material.OBSIDIAN, (double)150.0F);
|
||||
marketBaseValues.put(Material.TORCH, (double)15.0F);
|
||||
marketBaseValues.put(Material.END_ROD, (double)50.0F);
|
||||
marketBaseValues.put(Material.CHORUS_PLANT, (double)20.0F);
|
||||
marketBaseValues.put(Material.CHORUS_FLOWER, (double)20.0F);
|
||||
marketBaseValues.put(Material.PURPUR_BLOCK, (double)50.0F);
|
||||
marketBaseValues.put(Material.PURPUR_PILLAR, (double)50.0F);
|
||||
marketBaseValues.put(Material.PURPUR_STAIRS, (double)50.0F);
|
||||
marketBaseValues.put(Material.SPAWNER, (double)100.0F);
|
||||
marketBaseValues.put(Material.CHEST, (double)8.0F);
|
||||
marketBaseValues.put(Material.GUNPOWDER, (double)4.5F);
|
||||
marketBaseValues.put(Material.PAPER, (double)1.0F);
|
||||
marketBaseValues.put(Material.FIREWORK_ROCKET, (double)14.5F);
|
||||
marketBaseValues.put(Material.FIREWORK_STAR, (double)12.0F);
|
||||
marketBaseValues.put(Material.LEATHER, (double)15.0F);
|
||||
marketBaseValues.put(Material.STRING, (double)5.0F);
|
||||
marketBaseValues.put(Material.FEATHER, (double)3.0F);
|
||||
marketBaseValues.put(Material.FLINT, (double)4.0F);
|
||||
}
|
||||
static {
|
||||
marketBaseValues.put(Material.DRAGON_EGG, (double) 250000.0F);
|
||||
marketBaseValues.put(Material.DIAMOND, (double) 100.0F);
|
||||
marketBaseValues.put(Material.GOLD_INGOT, (double) 50.0F);
|
||||
marketBaseValues.put(Material.IRON_INGOT, (double) 25.0F);
|
||||
marketBaseValues.put(Material.COAL, (double) 10.0F);
|
||||
marketBaseValues.put(Material.EMERALD, (double) 75.0F);
|
||||
marketBaseValues.put(Material.REDSTONE, (double) 5.0F);
|
||||
marketBaseValues.put(Material.LAPIS_LAZULI, (double) 15.0F);
|
||||
marketBaseValues.put(Material.NETHERITE_INGOT, (double) 1500.0F);
|
||||
marketBaseValues.put(Material.STONE, (double) 1.5F);
|
||||
marketBaseValues.put(Material.GRANITE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.DIORITE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.ANDESITE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE, (double) 1.5F);
|
||||
marketBaseValues.put(Material.COBBLED_DEEPSLATE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.CALCITE, (double) 5.0F);
|
||||
marketBaseValues.put(Material.TUFF, (double) 4.0F);
|
||||
marketBaseValues.put(Material.DRIPSTONE_BLOCK, (double) 6.0F);
|
||||
marketBaseValues.put(Material.GRASS_BLOCK, (double) 2.0F);
|
||||
marketBaseValues.put(Material.DIRT, (double) 1.0F);
|
||||
marketBaseValues.put(Material.COARSE_DIRT, (double) 1.5F);
|
||||
marketBaseValues.put(Material.PODZOL, (double) 2.0F);
|
||||
marketBaseValues.put(Material.ROOTED_DIRT, (double) 1.5F);
|
||||
marketBaseValues.put(Material.MUD, (double) 1.5F);
|
||||
marketBaseValues.put(Material.CRIMSON_NYLIUM, (double) 2.5F);
|
||||
marketBaseValues.put(Material.WARPED_NYLIUM, (double) 2.5F);
|
||||
marketBaseValues.put(Material.COBBLESTONE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.OAK_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.SPRUCE_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.BIRCH_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.JUNGLE_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.ACACIA_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.CHERRY_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.DARK_OAK_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.MANGROVE_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.BAMBOO_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.CRIMSON_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.WARPED_PLANKS, (double) 0.25F);
|
||||
marketBaseValues.put(Material.BAMBOO_MOSAIC, (double) 0.25F);
|
||||
marketBaseValues.put(Material.OAK_SAPLING, (double) 4.0F);
|
||||
marketBaseValues.put(Material.BIRCH_SAPLING, (double) 4.0F);
|
||||
marketBaseValues.put(Material.JUNGLE_SAPLING, (double) 4.0F);
|
||||
marketBaseValues.put(Material.ACACIA_SAPLING, (double) 4.0F);
|
||||
marketBaseValues.put(Material.CHERRY_SAPLING, (double) 4.0F);
|
||||
marketBaseValues.put(Material.DARK_OAK_SAPLING, (double) 4.0F);
|
||||
marketBaseValues.put(Material.MANGROVE_PROPAGULE, (double) 4.0F);
|
||||
marketBaseValues.put(Material.SAND, (double) 1.0F);
|
||||
marketBaseValues.put(Material.SUSPICIOUS_SAND, (double) 125.0F);
|
||||
marketBaseValues.put(Material.SUSPICIOUS_GRAVEL, (double) 125.0F);
|
||||
marketBaseValues.put(Material.RED_SAND, (double) 1.0F);
|
||||
marketBaseValues.put(Material.GRAVEL, (double) 1.0F);
|
||||
marketBaseValues.put(Material.COAL_ORE, (double) 10.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_COAL_ORE, (double) 10.0F);
|
||||
marketBaseValues.put(Material.IRON_ORE, (double) 25.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_IRON_ORE, (double) 25.0F);
|
||||
marketBaseValues.put(Material.COPPER_ORE, (double) 7.5F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_COPPER_ORE, (double) 7.5F);
|
||||
marketBaseValues.put(Material.GOLD_ORE, (double) 50.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_GOLD_ORE, (double) 50.0F);
|
||||
marketBaseValues.put(Material.REDSTONE_ORE, (double) 5.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_REDSTONE_ORE, (double) 5.0F);
|
||||
marketBaseValues.put(Material.EMERALD_ORE, (double) 75.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_EMERALD_ORE, (double) 75.0F);
|
||||
marketBaseValues.put(Material.LAPIS_ORE, (double) 15.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_LAPIS_ORE, (double) 15.0F);
|
||||
marketBaseValues.put(Material.DIAMOND_ORE, (double) 100.0F);
|
||||
marketBaseValues.put(Material.DEEPSLATE_DIAMOND_ORE, (double) 100.0F);
|
||||
marketBaseValues.put(Material.NETHER_GOLD_ORE, (double) 25.0F);
|
||||
marketBaseValues.put(Material.NETHER_QUARTZ_ORE, (double) 10.0F);
|
||||
marketBaseValues.put(Material.ANCIENT_DEBRIS, (double) 325.0F);
|
||||
marketBaseValues.put(Material.EXPOSED_COPPER, (double) 67.5F);
|
||||
marketBaseValues.put(Material.WEATHERED_COPPER, (double) 67.5F);
|
||||
marketBaseValues.put(Material.OXIDIZED_COPPER, (double) 67.5F);
|
||||
marketBaseValues.put(Material.WAXED_COPPER_BLOCK, (double) 66.5F);
|
||||
marketBaseValues.put(Material.WAXED_EXPOSED_COPPER, (double) 66.5F);
|
||||
marketBaseValues.put(Material.WAXED_WEATHERED_COPPER, (double) 66.5F);
|
||||
marketBaseValues.put(Material.WAXED_OXIDIZED_COPPER, (double) 66.5F);
|
||||
marketBaseValues.put(Material.OAK_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.SPRUCE_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.BIRCH_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.JUNGLE_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.ACACIA_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.CHERRY_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.DARK_OAK_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.MANGROVE_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.MANGROVE_ROOTS, (double) 1.0F);
|
||||
marketBaseValues.put(Material.MUDDY_MANGROVE_ROOTS, (double) 1.0F);
|
||||
marketBaseValues.put(Material.CRIMSON_STEM, (double) 3.0F);
|
||||
marketBaseValues.put(Material.WARPED_STEM, (double) 3.0F);
|
||||
marketBaseValues.put(Material.BAMBOO_BLOCK, 0.8);
|
||||
marketBaseValues.put(Material.STRIPPED_OAK_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_SPRUCE_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_BIRCH_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_JUNGLE_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_ACACIA_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_CHERRY_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_DARK_OAK_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_MANGROVE_LOG, (double) 1.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_CRIMSON_STEM, (double) 3.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_WARPED_STEM, (double) 3.0F);
|
||||
marketBaseValues.put(Material.STRIPPED_OAK_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_SPRUCE_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_BIRCH_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_JUNGLE_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_ACACIA_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_CHERRY_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_DARK_OAK_WOOD, (double) 1.25F);
|
||||
marketBaseValues.put(Material.STRIPPED_CRIMSON_HYPHAE, (double) 3.75F);
|
||||
marketBaseValues.put(Material.STRIPPED_WARPED_HYPHAE, (double) 3.75F);
|
||||
marketBaseValues.put(Material.STRIPPED_BAMBOO_BLOCK, (double) 1.0F);
|
||||
marketBaseValues.put(Material.OAK_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.SPRUCE_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.BIRCH_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.JUNGLE_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.ACACIA_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.CHERRY_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.DARK_OAK_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.MANGROVE_WOOD, (double) 0.25F);
|
||||
marketBaseValues.put(Material.CRIMSON_HYPHAE, (double) 0.75F);
|
||||
marketBaseValues.put(Material.WARPED_HYPHAE, (double) 0.75F);
|
||||
marketBaseValues.put(Material.OAK_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.SPRUCE_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.BIRCH_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.JUNGLE_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.ACACIA_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.CHERRY_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.DARK_OAK_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.MANGROVE_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.AZALEA_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.FLOWERING_AZALEA_LEAVES, (double) 0.5F);
|
||||
marketBaseValues.put(Material.SPONGE, (double) 10.0F);
|
||||
marketBaseValues.put(Material.WET_SPONGE, (double) 10.0F);
|
||||
marketBaseValues.put(Material.GLASS, (double) 1.25F);
|
||||
marketBaseValues.put(Material.TINTED_GLASS, (double) 2.5F);
|
||||
marketBaseValues.put(Material.LAPIS_BLOCK, (double) 135.0F);
|
||||
marketBaseValues.put(Material.SANDSTONE, (double) 1.5F);
|
||||
marketBaseValues.put(Material.CHISELED_SANDSTONE, (double) 1.5F);
|
||||
marketBaseValues.put(Material.CUT_SANDSTONE, (double) 1.5F);
|
||||
marketBaseValues.put(Material.COBWEB, (double) 4.0F);
|
||||
marketBaseValues.put(Material.SHORT_GRASS, (double) 1.0F);
|
||||
marketBaseValues.put(Material.FERN, (double) 2.5F);
|
||||
marketBaseValues.put(Material.AZALEA, (double) 2.5F);
|
||||
marketBaseValues.put(Material.FLOWERING_AZALEA, (double) 3.0F);
|
||||
marketBaseValues.put(Material.DEAD_BUSH, (double) 1.0F);
|
||||
marketBaseValues.put(Material.SEAGRASS, (double) 10.0F);
|
||||
marketBaseValues.put(Material.SEA_PICKLE, (double) 3.0F);
|
||||
marketBaseValues.put(Material.WHITE_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.ORANGE_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.MAGENTA_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.LIGHT_BLUE_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.YELLOW_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.LIME_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.PINK_WOOL, (double) 4.0F);
|
||||
marketBaseValues.put(Material.GRAY_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.LIGHT_GRAY_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.CYAN_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.PURPLE_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.BLUE_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.BROWN_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.GREEN_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.RED_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.BLACK_WOOL, (double) 3.5F);
|
||||
marketBaseValues.put(Material.DANDELION, (double) 3.0F);
|
||||
marketBaseValues.put(Material.POPPY, (double) 3.0F);
|
||||
marketBaseValues.put(Material.BLUE_ORCHID, (double) 3.0F);
|
||||
marketBaseValues.put(Material.ALLIUM, (double) 3.0F);
|
||||
marketBaseValues.put(Material.AZURE_BLUET, (double) 3.0F);
|
||||
marketBaseValues.put(Material.RED_TULIP, (double) 3.0F);
|
||||
marketBaseValues.put(Material.ORANGE_TULIP, (double) 3.0F);
|
||||
marketBaseValues.put(Material.WHITE_TULIP, (double) 3.0F);
|
||||
marketBaseValues.put(Material.PINK_TULIP, (double) 3.0F);
|
||||
marketBaseValues.put(Material.OXEYE_DAISY, (double) 3.0F);
|
||||
marketBaseValues.put(Material.CORNFLOWER, (double) 3.0F);
|
||||
marketBaseValues.put(Material.LILY_OF_THE_VALLEY, (double) 3.0F);
|
||||
marketBaseValues.put(Material.WITHER_ROSE, (double) 3.0F);
|
||||
marketBaseValues.put(Material.TORCHFLOWER, (double) 3.0F);
|
||||
marketBaseValues.put(Material.PITCHER_PLANT, (double) 3.0F);
|
||||
marketBaseValues.put(Material.SPORE_BLOSSOM, (double) 3.0F);
|
||||
marketBaseValues.put(Material.BROWN_MUSHROOM, (double) 10.0F);
|
||||
marketBaseValues.put(Material.RED_MUSHROOM, (double) 10.0F);
|
||||
marketBaseValues.put(Material.CRIMSON_FUNGUS, (double) 10.0F);
|
||||
marketBaseValues.put(Material.WARPED_FUNGUS, (double) 10.0F);
|
||||
marketBaseValues.put(Material.CRIMSON_ROOTS, (double) 10.0F);
|
||||
marketBaseValues.put(Material.WARPED_ROOTS, (double) 10.0F);
|
||||
marketBaseValues.put(Material.NETHER_SPROUTS, (double) 5.0F);
|
||||
marketBaseValues.put(Material.WEEPING_VINES, (double) 4.0F);
|
||||
marketBaseValues.put(Material.TWISTING_VINES, (double) 4.0F);
|
||||
marketBaseValues.put(Material.SUGAR_CANE, (double) 7.0F);
|
||||
marketBaseValues.put(Material.KELP, (double) 1.5F);
|
||||
marketBaseValues.put(Material.MOSS_CARPET, (double) 1.0F);
|
||||
marketBaseValues.put(Material.PINK_PETALS, (double) 1.5F);
|
||||
marketBaseValues.put(Material.MOSS_BLOCK, (double) 1.0F);
|
||||
marketBaseValues.put(Material.HANGING_ROOTS, (double) 1.0F);
|
||||
marketBaseValues.put(Material.BIG_DRIPLEAF, (double) 2.0F);
|
||||
marketBaseValues.put(Material.SMALL_DRIPLEAF, (double) 1.5F);
|
||||
marketBaseValues.put(Material.BAMBOO, 0.2);
|
||||
marketBaseValues.put(Material.OAK_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.SPRUCE_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.BIRCH_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.JUNGLE_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.ACACIA_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.CHERRY_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.DARK_OAK_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.MANGROVE_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.BAMBOO_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.BAMBOO_MOSAIC_SLAB, (double) 0.125F);
|
||||
marketBaseValues.put(Material.CRIMSON_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.WARPED_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.STONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.SMOOTH_STONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.SANDSTONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.CUT_SANDSTONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.PETRIFIED_OAK_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.COBBLESTONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.BRICK_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.STONE_BRICK_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.MUD_BRICK_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.NETHER_BRICK_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.QUARTZ_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.RED_SANDSTONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.CUT_RED_SANDSTONE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.PURPUR_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.PRISMARINE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.PRISMARINE_BRICK_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.DARK_PRISMARINE_SLAB, (double) 0.25F);
|
||||
marketBaseValues.put(Material.SMOOTH_QUARTZ, (double) 5.0F);
|
||||
marketBaseValues.put(Material.SMOOTH_RED_SANDSTONE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.SMOOTH_SANDSTONE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.SMOOTH_STONE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.BRICKS, (double) 1.0F);
|
||||
marketBaseValues.put(Material.BOOKSHELF, (double) 3.0F);
|
||||
marketBaseValues.put(Material.CHISELED_BOOKSHELF, (double) 3.0F);
|
||||
marketBaseValues.put(Material.DECORATED_POT, (double) 1.5F);
|
||||
marketBaseValues.put(Material.MOSSY_COBBLESTONE, (double) 1.0F);
|
||||
marketBaseValues.put(Material.OBSIDIAN, (double) 150.0F);
|
||||
marketBaseValues.put(Material.TORCH, (double) 15.0F);
|
||||
marketBaseValues.put(Material.END_ROD, (double) 50.0F);
|
||||
marketBaseValues.put(Material.CHORUS_PLANT, (double) 20.0F);
|
||||
marketBaseValues.put(Material.CHORUS_FLOWER, (double) 20.0F);
|
||||
marketBaseValues.put(Material.PURPUR_BLOCK, (double) 50.0F);
|
||||
marketBaseValues.put(Material.PURPUR_PILLAR, (double) 50.0F);
|
||||
marketBaseValues.put(Material.PURPUR_STAIRS, (double) 50.0F);
|
||||
marketBaseValues.put(Material.SPAWNER, (double) 100.0F);
|
||||
marketBaseValues.put(Material.CHEST, (double) 8.0F);
|
||||
marketBaseValues.put(Material.GUNPOWDER, (double) 4.5F);
|
||||
marketBaseValues.put(Material.PAPER, (double) 1.0F);
|
||||
marketBaseValues.put(Material.FIREWORK_ROCKET, (double) 14.5F);
|
||||
marketBaseValues.put(Material.FIREWORK_STAR, (double) 12.0F);
|
||||
marketBaseValues.put(Material.LEATHER, (double) 15.0F);
|
||||
marketBaseValues.put(Material.STRING, (double) 5.0F);
|
||||
marketBaseValues.put(Material.FEATHER, (double) 3.0F);
|
||||
marketBaseValues.put(Material.FLINT, (double) 4.0F);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,23 @@
|
|||
package org.gsdistance.grimmsServer.Data.Market;
|
||||
|
||||
import java.util.Map;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PotionEffectBaseValues {
|
||||
public static final Map<PotionEffectType, Double> potionEffectBaseValues;
|
||||
public static final Map<PotionEffectType, Integer> potionEffectAmplitudeLimits;
|
||||
public static final Map<PotionEffectType, Double> potionEffectBaseValues;
|
||||
public static final Map<PotionEffectType, Integer> potionEffectAmplitudeLimits;
|
||||
|
||||
public PotionEffectBaseValues() {
|
||||
}
|
||||
public PotionEffectBaseValues() {
|
||||
}
|
||||
|
||||
public static double getPotionEffectBaseValue(PotionEffectType potionEffectType, int time, int amplifier) {
|
||||
Integer limit = (Integer)potionEffectAmplitudeLimits.get(potionEffectType);
|
||||
return limit != null && amplifier > limit ? Double.MAX_VALUE : (Double)potionEffectBaseValues.get(potionEffectType) * (double)time * Math.pow((double)amplifier, (double)2.0F);
|
||||
}
|
||||
public static double getPotionEffectBaseValue(PotionEffectType potionEffectType, int time, int amplifier) {
|
||||
Integer limit = potionEffectAmplitudeLimits.get(potionEffectType);
|
||||
return limit != null && amplifier > limit ? Double.MAX_VALUE : potionEffectBaseValues.get(potionEffectType) * (double) time * Math.pow(amplifier, 2.0F);
|
||||
}
|
||||
|
||||
static {
|
||||
potionEffectBaseValues = Map.ofEntries(Map.entry(PotionEffectType.SPEED, (double)5.0F), Map.entry(PotionEffectType.SLOWNESS, (double)3.0F), Map.entry(PotionEffectType.HASTE, (double)8.0F), Map.entry(PotionEffectType.MINING_FATIGUE, (double)2.0F), Map.entry(PotionEffectType.STRENGTH, (double)10.0F), Map.entry(PotionEffectType.INSTANT_HEALTH, (double)50.0F), Map.entry(PotionEffectType.INSTANT_DAMAGE, (double)45.0F), Map.entry(PotionEffectType.JUMP_BOOST, (double)4.0F), Map.entry(PotionEffectType.NAUSEA, (double)1.0F), Map.entry(PotionEffectType.REGENERATION, (double)12.0F), Map.entry(PotionEffectType.RESISTANCE, (double)15.0F), Map.entry(PotionEffectType.FIRE_RESISTANCE, (double)6.0F), Map.entry(PotionEffectType.WATER_BREATHING, (double)4.0F), Map.entry(PotionEffectType.INVISIBILITY, (double)20.0F), Map.entry(PotionEffectType.BLINDNESS, (double)2.0F), Map.entry(PotionEffectType.NIGHT_VISION, (double)3.0F), Map.entry(PotionEffectType.HUNGER, (double)1.0F), Map.entry(PotionEffectType.WEAKNESS, (double)2.0F), Map.entry(PotionEffectType.POISON, (double)8.0F), Map.entry(PotionEffectType.WITHER, (double)18.0F), Map.entry(PotionEffectType.HEALTH_BOOST, (double)150.0F), Map.entry(PotionEffectType.ABSORPTION, (double)20.0F), Map.entry(PotionEffectType.GLOWING, (double)1.0F), Map.entry(PotionEffectType.LEVITATION, (double)12.0F), Map.entry(PotionEffectType.LUCK, (double)30.0F), Map.entry(PotionEffectType.UNLUCK, (double)2.0F), Map.entry(PotionEffectType.SLOW_FALLING, (double)5.0F), Map.entry(PotionEffectType.CONDUIT_POWER, (double)14.0F), Map.entry(PotionEffectType.DOLPHINS_GRACE, (double)3.0F), Map.entry(PotionEffectType.BAD_OMEN, (double)8.0F), Map.entry(PotionEffectType.HERO_OF_THE_VILLAGE, (double)25.0F), Map.entry(PotionEffectType.DARKNESS, (double)2.0F), Map.entry(PotionEffectType.TRIAL_OMEN, (double)10.0F), Map.entry(PotionEffectType.WIND_CHARGED, (double)7.0F), Map.entry(PotionEffectType.WEAVING, (double)6.0F), Map.entry(PotionEffectType.OOZING, (double)5.0F), Map.entry(PotionEffectType.INFESTED, (double)4.0F));
|
||||
potionEffectAmplitudeLimits = Map.ofEntries(Map.entry(PotionEffectType.REGENERATION, 2), Map.entry(PotionEffectType.RESISTANCE, 1), Map.entry(PotionEffectType.HASTE, 3));
|
||||
}
|
||||
static {
|
||||
potionEffectBaseValues = Map.ofEntries(Map.entry(PotionEffectType.SPEED, (double) 5.0F), Map.entry(PotionEffectType.SLOWNESS, (double) 3.0F), Map.entry(PotionEffectType.HASTE, (double) 8.0F), Map.entry(PotionEffectType.MINING_FATIGUE, (double) 2.0F), Map.entry(PotionEffectType.STRENGTH, (double) 10.0F), Map.entry(PotionEffectType.INSTANT_HEALTH, (double) 50.0F), Map.entry(PotionEffectType.INSTANT_DAMAGE, (double) 45.0F), Map.entry(PotionEffectType.JUMP_BOOST, (double) 4.0F), Map.entry(PotionEffectType.NAUSEA, (double) 1.0F), Map.entry(PotionEffectType.REGENERATION, (double) 12.0F), Map.entry(PotionEffectType.RESISTANCE, (double) 15.0F), Map.entry(PotionEffectType.FIRE_RESISTANCE, (double) 6.0F), Map.entry(PotionEffectType.WATER_BREATHING, (double) 4.0F), Map.entry(PotionEffectType.INVISIBILITY, (double) 20.0F), Map.entry(PotionEffectType.BLINDNESS, (double) 2.0F), Map.entry(PotionEffectType.NIGHT_VISION, (double) 3.0F), Map.entry(PotionEffectType.HUNGER, (double) 1.0F), Map.entry(PotionEffectType.WEAKNESS, (double) 2.0F), Map.entry(PotionEffectType.POISON, (double) 8.0F), Map.entry(PotionEffectType.WITHER, (double) 18.0F), Map.entry(PotionEffectType.HEALTH_BOOST, (double) 150.0F), Map.entry(PotionEffectType.ABSORPTION, (double) 20.0F), Map.entry(PotionEffectType.GLOWING, (double) 1.0F), Map.entry(PotionEffectType.LEVITATION, (double) 12.0F), Map.entry(PotionEffectType.LUCK, (double) 30.0F), Map.entry(PotionEffectType.UNLUCK, (double) 2.0F), Map.entry(PotionEffectType.SLOW_FALLING, (double) 5.0F), Map.entry(PotionEffectType.CONDUIT_POWER, (double) 14.0F), Map.entry(PotionEffectType.DOLPHINS_GRACE, (double) 3.0F), Map.entry(PotionEffectType.BAD_OMEN, (double) 8.0F), Map.entry(PotionEffectType.HERO_OF_THE_VILLAGE, (double) 25.0F), Map.entry(PotionEffectType.DARKNESS, (double) 2.0F), Map.entry(PotionEffectType.TRIAL_OMEN, (double) 10.0F), Map.entry(PotionEffectType.WIND_CHARGED, (double) 7.0F), Map.entry(PotionEffectType.WEAVING, (double) 6.0F), Map.entry(PotionEffectType.OOZING, (double) 5.0F), Map.entry(PotionEffectType.INFESTED, (double) 4.0F));
|
||||
potionEffectAmplitudeLimits = Map.ofEntries(Map.entry(PotionEffectType.REGENERATION, 2), Map.entry(PotionEffectType.RESISTANCE, 1), Map.entry(PotionEffectType.HASTE, 3));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,24 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import org.gsdistance.grimmsServer.Constructable.Data;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.gsdistance.grimmsServer.Constructable.Data;
|
||||
|
||||
public class PerSessionDataStorage {
|
||||
public static final Map<String, Data<Object, Type>> dataStore = new HashMap();
|
||||
public static Double tpCost = (double)500.0F;
|
||||
public static final Map<String, Data<Object, Type>> dataStore = new HashMap();
|
||||
public static Double tpCost = (double) 500.0F;
|
||||
|
||||
public PerSessionDataStorage() {
|
||||
}
|
||||
public PerSessionDataStorage() {
|
||||
}
|
||||
|
||||
public static <T> void softSave(T data, Class<T> ignoredType, String key) {
|
||||
dataStore.put(key, Data.of(data, ignoredType));
|
||||
}
|
||||
public static <T> void softSave(T data, Class<T> ignoredType, String key) {
|
||||
dataStore.put(key, Data.of(data, ignoredType));
|
||||
}
|
||||
|
||||
public static <T> T getData(String key, Class<T> type) {
|
||||
Data<Object, Type> data = (Data)dataStore.get(key);
|
||||
return (T)(data != null && type.isInstance(data.key()) ? type.cast(data.key()) : null);
|
||||
}
|
||||
public static <T> T getData(String key, Class<T> type) {
|
||||
Data<Object, Type> data = dataStore.get(key);
|
||||
return data != null && type.isInstance(data.key()) ? type.cast(data.key()) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
package org.gsdistance.grimmsServer.Data.Player;
|
||||
|
||||
public enum PlayerCapability {
|
||||
AUTOSELL("Auto Sell", "Allows the player to automatically sell items in their inventory when they reach a certain threshold.", "autosell"),
|
||||
MAGNET("Magnet", "Magnetises items in a 10 block radius", "magnet");
|
||||
AUTOSELL("Auto Sell", "Allows the player to automatically sell items in their inventory when they reach a certain threshold.", "autosell"),
|
||||
MAGNET("Magnet", "Magnetises items in a 10 block radius", "magnet");
|
||||
|
||||
public final String displayName;
|
||||
public final String description;
|
||||
public final String capabilityId;
|
||||
public final String displayName;
|
||||
public final String description;
|
||||
public final String capabilityId;
|
||||
|
||||
private PlayerCapability(String displayName, String description, String capabilityId) {
|
||||
this.displayName = displayName;
|
||||
this.description = description;
|
||||
this.capabilityId = capabilityId;
|
||||
}
|
||||
PlayerCapability(String displayName, String description, String capabilityId) {
|
||||
this.displayName = displayName;
|
||||
this.description = description;
|
||||
this.capabilityId = capabilityId;
|
||||
}
|
||||
|
||||
// $FF: synthetic method
|
||||
private static PlayerCapability[] $values() {
|
||||
return new PlayerCapability[]{AUTOSELL, MAGNET};
|
||||
}
|
||||
// $FF: synthetic method
|
||||
private static PlayerCapability[] $values() {
|
||||
return new PlayerCapability[]{AUTOSELL, MAGNET};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,47 +1,47 @@
|
|||
package org.gsdistance.grimmsServer.Data.Player;
|
||||
|
||||
public enum PlayerRank {
|
||||
DEFAULT("Default", 1),
|
||||
VIP("Vip", 2),
|
||||
MVP("MVP", 3),
|
||||
MODERATOR("Moderator", 4),
|
||||
ADMIN("Admin", 5),
|
||||
OWNER("Owner", 99);
|
||||
DEFAULT("Default", 1),
|
||||
VIP("Vip", 2),
|
||||
MVP("MVP", 3),
|
||||
MODERATOR("Moderator", 4),
|
||||
ADMIN("Admin", 5),
|
||||
OWNER("Owner", 99);
|
||||
|
||||
public final String name;
|
||||
public final Integer weight;
|
||||
public final String name;
|
||||
public final Integer weight;
|
||||
|
||||
private PlayerRank(String name, Integer weight) {
|
||||
this.name = name;
|
||||
this.weight = weight;
|
||||
}
|
||||
PlayerRank(String name, Integer weight) {
|
||||
this.name = name;
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public static PlayerRank fromWeight(int weight) {
|
||||
for(PlayerRank rank : values()) {
|
||||
if (rank.weight == weight) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
public static PlayerRank fromWeight(int weight) {
|
||||
for (PlayerRank rank : values()) {
|
||||
if (rank.weight == weight) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
|
||||
return DEFAULT;
|
||||
}
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
public static PlayerRank fromString(String name) {
|
||||
for(PlayerRank rank : values()) {
|
||||
if (rank.name.equalsIgnoreCase(name)) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
public static PlayerRank fromString(String name) {
|
||||
for (PlayerRank rank : values()) {
|
||||
if (rank.name.equalsIgnoreCase(name)) {
|
||||
return rank;
|
||||
}
|
||||
}
|
||||
|
||||
return DEFAULT;
|
||||
}
|
||||
return DEFAULT;
|
||||
}
|
||||
|
||||
// $FF: synthetic method
|
||||
private static PlayerRank[] $values() {
|
||||
return new PlayerRank[]{DEFAULT, VIP, MVP, MODERATOR, ADMIN, OWNER};
|
||||
}
|
||||
// $FF: synthetic method
|
||||
private static PlayerRank[] $values() {
|
||||
return new PlayerRank[]{DEFAULT, VIP, MVP, MODERATOR, ADMIN, OWNER};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,100 +5,100 @@ import org.gsdistance.grimmsServer.Stats.PlayerStats;
|
|||
import org.gsdistance.grimmsServer.Stats.PlayerTitles;
|
||||
|
||||
public class PlayerTitleChecker {
|
||||
public PlayerTitleChecker() {
|
||||
}
|
||||
public PlayerTitleChecker() {
|
||||
}
|
||||
|
||||
public static void killedPlayer(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Murderer");
|
||||
}
|
||||
public static void killedPlayer(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Murderer");
|
||||
}
|
||||
|
||||
public static void gotKilledByPlayer(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Victim");
|
||||
}
|
||||
public static void gotKilledByPlayer(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Victim");
|
||||
}
|
||||
|
||||
public static void killedDragon(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("DragonSlayer");
|
||||
}
|
||||
public static void killedDragon(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("DragonSlayer");
|
||||
}
|
||||
|
||||
public static void gotOnLeaderboard(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Leader");
|
||||
}
|
||||
public static void gotOnLeaderboard(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Leader");
|
||||
}
|
||||
|
||||
public static void joinedGame(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Newbie");
|
||||
}
|
||||
public static void joinedGame(Player player) {
|
||||
PlayerTitles.getPlayerTitles(player).addTitle("Newbie");
|
||||
}
|
||||
|
||||
public static void checkTitles(Player player) {
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (playerTitles.getTitles().length > 5) {
|
||||
playerTitles.addTitle("Titlemaxxer");
|
||||
}
|
||||
public static void checkTitles(Player player) {
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (playerTitles.getTitles().length > 5) {
|
||||
playerTitles.addTitle("Titlemaxxer");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkForMoney(Player player) {
|
||||
double money = (Double)PlayerStats.getPlayerStats(player).getStat("money", Double.class);
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (money > (double)100000.0F) {
|
||||
playerTitles.addTitle("Richie");
|
||||
}
|
||||
public static void checkForMoney(Player player) {
|
||||
double money = PlayerStats.getPlayerStats(player).getStat("money", Double.class);
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (money > (double) 100000.0F) {
|
||||
playerTitles.addTitle("Richie");
|
||||
}
|
||||
|
||||
if (money > (double)1000000.0F) {
|
||||
playerTitles.addTitle("Millionaire");
|
||||
}
|
||||
if (money > (double) 1000000.0F) {
|
||||
playerTitles.addTitle("Millionaire");
|
||||
}
|
||||
|
||||
if (money > (double)1.0E9F) {
|
||||
playerTitles.addTitle("Billionaire");
|
||||
}
|
||||
if (money > (double) 1.0E9F) {
|
||||
playerTitles.addTitle("Billionaire");
|
||||
}
|
||||
|
||||
if (money > 1.0E12) {
|
||||
playerTitles.addTitle("Trillionaire");
|
||||
}
|
||||
if (money > 1.0E12) {
|
||||
playerTitles.addTitle("Trillionaire");
|
||||
}
|
||||
|
||||
if (money > 1.0E15) {
|
||||
playerTitles.addTitle("Trillionaire");
|
||||
}
|
||||
if (money > 1.0E15) {
|
||||
playerTitles.addTitle("Trillionaire");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkForBlockBreaks(Player player) {
|
||||
long blockBreakCount = (Long)PlayerStats.getPlayerStats(player).getStat("block_break_count", Long.class);
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (blockBreakCount > 1000L) {
|
||||
playerTitles.addTitle("Miner");
|
||||
}
|
||||
public static void checkForBlockBreaks(Player player) {
|
||||
long blockBreakCount = PlayerStats.getPlayerStats(player).getStat("block_break_count", Long.class);
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (blockBreakCount > 1000L) {
|
||||
playerTitles.addTitle("Miner");
|
||||
}
|
||||
|
||||
if (blockBreakCount > 10000L) {
|
||||
playerTitles.addTitle("Anti-block");
|
||||
}
|
||||
if (blockBreakCount > 10000L) {
|
||||
playerTitles.addTitle("Anti-block");
|
||||
}
|
||||
|
||||
if (blockBreakCount > 100000L) {
|
||||
playerTitles.addTitle("UltimateMiner");
|
||||
}
|
||||
if (blockBreakCount > 100000L) {
|
||||
playerTitles.addTitle("UltimateMiner");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkForTotalKills(Player player) {
|
||||
Object totalKillsObj = PlayerStats.getPlayerStats(player).getStat("total_kill_count", Object.class);
|
||||
long totalKills;
|
||||
if (totalKillsObj instanceof Integer) {
|
||||
totalKills = ((Integer)totalKillsObj).longValue();
|
||||
} else {
|
||||
totalKills = (Long)totalKillsObj;
|
||||
}
|
||||
public static void checkForTotalKills(Player player) {
|
||||
Object totalKillsObj = PlayerStats.getPlayerStats(player).getStat("total_kill_count", Object.class);
|
||||
long totalKills;
|
||||
if (totalKillsObj instanceof Integer) {
|
||||
totalKills = ((Integer) totalKillsObj).longValue();
|
||||
} else {
|
||||
totalKills = (Long) totalKillsObj;
|
||||
}
|
||||
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (totalKills > 100L) {
|
||||
playerTitles.addTitle("KillingMachine");
|
||||
}
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (totalKills > 100L) {
|
||||
playerTitles.addTitle("KillingMachine");
|
||||
}
|
||||
|
||||
if (totalKills > 1000L) {
|
||||
playerTitles.addTitle("ProGamer");
|
||||
}
|
||||
if (totalKills > 1000L) {
|
||||
playerTitles.addTitle("ProGamer");
|
||||
}
|
||||
|
||||
if (totalKills > 10000L) {
|
||||
playerTitles.addTitle("Hitman");
|
||||
}
|
||||
if (totalKills > 10000L) {
|
||||
playerTitles.addTitle("Hitman");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,105 +1,106 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.gsdistance.grimmsServer.GrimmsServer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.gsdistance.grimmsServer.GrimmsServer;
|
||||
|
||||
public class PluginDataStorage {
|
||||
private final JavaPlugin plugin;
|
||||
private final Gson jsonParser = new Gson();
|
||||
private final JavaPlugin plugin;
|
||||
private final Gson jsonParser = new Gson();
|
||||
|
||||
public PluginDataStorage(JavaPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
public PluginDataStorage(JavaPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public boolean exists(String fileName, String addedPath) {
|
||||
File readFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File readFile = new File(readFolder.getPath() + File.separatorChar + fileName);
|
||||
return readFile.exists();
|
||||
}
|
||||
public boolean exists(String fileName, String addedPath) {
|
||||
File readFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File readFile = new File(readFolder.getPath() + File.separatorChar + fileName);
|
||||
return readFile.exists();
|
||||
}
|
||||
|
||||
public <T> void saveData(T object, Class<T> objectType, String fileName, String addedPath) {
|
||||
File writeFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File writeFile = new File(writeFolder.getPath() + File.separatorChar + fileName);
|
||||
if (!writeFolder.exists()) {
|
||||
writeFolder.mkdirs();
|
||||
}
|
||||
public <T> void saveData(T object, Class<T> objectType, String fileName, String addedPath) {
|
||||
File writeFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File writeFile = new File(writeFolder.getPath() + File.separatorChar + fileName);
|
||||
if (!writeFolder.exists()) {
|
||||
writeFolder.mkdirs();
|
||||
}
|
||||
|
||||
if (!writeFile.exists()) {
|
||||
try {
|
||||
writeFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
String data = this.jsonParser.toJson(object, objectType);
|
||||
|
||||
try (FileWriter writer = new FileWriter(writeFile)) {
|
||||
writer.write(data);
|
||||
} catch (IOException e) {
|
||||
this.plugin.getLogger().warning("Failed to save data to " + writeFile.getPath());
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to save data to " + writeFile.getPath(), e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public <T> T retrieveData(String fileName, String addedPath, Class<T> ignoredType) {
|
||||
File readFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File readFile = new File(readFolder.getPath() + File.separatorChar + fileName);
|
||||
if (!readFile.exists()) {
|
||||
return null;
|
||||
} else {
|
||||
try (FileReader reader = new FileReader(readFile)) {
|
||||
Object result = this.jsonParser.fromJson(reader, ignoredType);
|
||||
return (T)result;
|
||||
} catch (IOException e) {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to retrieve data from " + readFile.getPath(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T[] retrieveAllData(Class<T> objectType, String addedPath) {
|
||||
File readFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
if (!readFolder.exists()) {
|
||||
return null;
|
||||
} else {
|
||||
File[] files = readFolder.listFiles();
|
||||
if (files != null && files.length != 0) {
|
||||
T[] dataObjects = (T[])((Object[])Array.newInstance(objectType, files.length));
|
||||
|
||||
for(int i = 0; i < files.length; ++i) {
|
||||
try (FileReader reader = new FileReader(files[i])) {
|
||||
dataObjects[i] = this.jsonParser.fromJson(reader, objectType);
|
||||
} catch (IOException e) {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to retrieve data from " + files[i].getPath(), e);
|
||||
}
|
||||
if (!writeFile.exists()) {
|
||||
try {
|
||||
writeFile.createNewFile();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
return dataObjects;
|
||||
} else {
|
||||
return (T[])((Object[])Array.newInstance(objectType, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
String data = this.jsonParser.toJson(object, objectType);
|
||||
|
||||
public void deleteData(String fileName, String addedPath) {
|
||||
File deleteFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File deleteFile = new File(deleteFolder.getPath() + File.separatorChar + fileName);
|
||||
if (deleteFile.exists()) {
|
||||
if (!deleteFile.delete()) {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to delete data file: " + deleteFile.getPath());
|
||||
}
|
||||
} else {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Data file does not exist: " + deleteFile.getPath());
|
||||
}
|
||||
try (FileWriter writer = new FileWriter(writeFile)) {
|
||||
writer.write(data);
|
||||
} catch (IOException e) {
|
||||
this.plugin.getLogger().warning("Failed to save data to " + writeFile.getPath());
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to save data to " + writeFile.getPath(), e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T retrieveData(String fileName, String addedPath, Class<T> ignoredType) {
|
||||
File readFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File readFile = new File(readFolder.getPath() + File.separatorChar + fileName);
|
||||
if (!readFile.exists()) {
|
||||
return null;
|
||||
} else {
|
||||
try (FileReader reader = new FileReader(readFile)) {
|
||||
Object result = this.jsonParser.fromJson(reader, ignoredType);
|
||||
return (T) result;
|
||||
} catch (IOException e) {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to retrieve data from " + readFile.getPath(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public <T> T[] retrieveAllData(Class<T> objectType, String addedPath) {
|
||||
File readFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
if (!readFolder.exists()) {
|
||||
return null;
|
||||
} else {
|
||||
File[] files = readFolder.listFiles();
|
||||
if (files != null && files.length != 0) {
|
||||
T[] dataObjects = (T[]) Array.newInstance(objectType, files.length);
|
||||
|
||||
for (int i = 0; i < files.length; ++i) {
|
||||
try (FileReader reader = new FileReader(files[i])) {
|
||||
dataObjects[i] = this.jsonParser.fromJson(reader, objectType);
|
||||
} catch (IOException e) {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to retrieve data from " + files[i].getPath(), e);
|
||||
}
|
||||
}
|
||||
|
||||
return dataObjects;
|
||||
} else {
|
||||
return (T[]) Array.newInstance(objectType, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void deleteData(String fileName, String addedPath) {
|
||||
File deleteFolder = new File(this.plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File deleteFile = new File(deleteFolder.getPath() + File.separatorChar + fileName);
|
||||
if (deleteFile.exists()) {
|
||||
if (!deleteFile.delete()) {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Failed to delete data file: " + deleteFile.getPath());
|
||||
}
|
||||
} else {
|
||||
GrimmsServer.logger.log(Level.WARNING, "Data file does not exist: " + deleteFile.getPath());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,31 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class StaticLists {
|
||||
public static final List<EntityType> xpBlacklist = new ArrayList();
|
||||
public static final List<EntityType> xpBlacklist = new ArrayList();
|
||||
|
||||
public StaticLists() {
|
||||
}
|
||||
public StaticLists() {
|
||||
}
|
||||
|
||||
static {
|
||||
xpBlacklist.add(EntityType.ITEM_FRAME);
|
||||
xpBlacklist.add(EntityType.PAINTING);
|
||||
xpBlacklist.add(EntityType.MINECART);
|
||||
xpBlacklist.add(EntityType.END_CRYSTAL);
|
||||
xpBlacklist.add(EntityType.ITEM);
|
||||
static {
|
||||
xpBlacklist.add(EntityType.ITEM_FRAME);
|
||||
xpBlacklist.add(EntityType.PAINTING);
|
||||
xpBlacklist.add(EntityType.MINECART);
|
||||
xpBlacklist.add(EntityType.END_CRYSTAL);
|
||||
xpBlacklist.add(EntityType.ITEM);
|
||||
|
||||
for(EntityType e : EntityType.values()) {
|
||||
try {
|
||||
if (e.getKey().getKey().toLowerCase().contains("boat")) {
|
||||
xpBlacklist.add(e);
|
||||
for (EntityType e : EntityType.values()) {
|
||||
try {
|
||||
if (e.getKey().getKey().toLowerCase().contains("boat")) {
|
||||
xpBlacklist.add(e);
|
||||
}
|
||||
} catch (IllegalArgumentException var5) {
|
||||
}
|
||||
} catch (IllegalArgumentException var5) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue