Push
This commit is contained in:
parent
0311b5af22
commit
79098e3e24
41 changed files with 318 additions and 42 deletions
|
|
@ -1,28 +0,0 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.gsdistance.grimmsServer.GrimmsServer;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class Config {
|
||||
public final JavaPlugin plugin;
|
||||
public final Logger logger;
|
||||
public final FileConfiguration config;
|
||||
public Config(JavaPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
this.logger = plugin.getLogger();
|
||||
this.config = plugin.getConfig();
|
||||
}
|
||||
|
||||
public void saveConfig() {
|
||||
try {
|
||||
config.save(plugin.getDataFolder().getPath() + File.pathSeparatorChar + "config.yml");
|
||||
} catch (Exception e) {
|
||||
logger.warning("Failed to save config file");
|
||||
logger.warning(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,7 +5,7 @@ import org.bukkit.enchantments.Enchantment;
|
|||
import java.util.Map;
|
||||
|
||||
public class EnchantBaseValues {
|
||||
public static final Map<Enchantment, Double> enchantBaseValues = Map.ofEntries(
|
||||
public static Map<Enchantment, Double> enchantBaseValues = Map.ofEntries(
|
||||
Map.entry(Enchantment.SHARPNESS, 3000.0),
|
||||
Map.entry(Enchantment.EFFICIENCY, 3500.0),
|
||||
Map.entry(Enchantment.KNOCKBACK, 2000.0),
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import org.bukkit.Material;
|
|||
import java.util.Map;
|
||||
|
||||
public class MarketBaseValues {
|
||||
public static final Map<Material, Double> marketBaseValues = Map.ofEntries(
|
||||
public static Map<Material, Double> marketBaseValues = Map.ofEntries(
|
||||
Map.entry(Material.DRAGON_EGG, 250000.0),
|
||||
Map.entry(Material.DIAMOND, 100.0),
|
||||
Map.entry(Material.GOLD_INGOT, 50.0),
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package org.gsdistance.grimmsServer.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class ModuleRequirements {
|
||||
public static final Map<String, String> CommandRequirements;
|
||||
static {
|
||||
CommandRequirements = Map.ofEntries(
|
||||
Map.entry("","job")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -33,6 +33,9 @@ public class PlayerTitleManager {
|
|||
}
|
||||
|
||||
public static void checkForMoney(Player player) {
|
||||
if(!PlayerStats.getPlayerStats(player).hasExactStat("money")){
|
||||
return;
|
||||
}
|
||||
double money = (double) PlayerStats.getPlayerStats(player).getStat("money");
|
||||
PlayerTitles playerTitles = PlayerTitles.getPlayerTitles(player);
|
||||
if (money > 100000.0) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public class PluginDataStorage {
|
|||
}
|
||||
|
||||
public void saveData(Object object, Type objectType, String fileName, String addedPath) {
|
||||
File writeFolder = new File(plugin.getDataFolder().getPath() + addedPath);
|
||||
File writeFolder = new File(plugin.getDataFolder().getPath() + File.separatorChar + addedPath);
|
||||
File writeFile = new File(writeFolder.getPath() + File.separatorChar + fileName);
|
||||
if (!writeFolder.exists()) {
|
||||
writeFolder.mkdir();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue