public Map<String, String> getEpDBSettings() { Map<String, String> epSettings = new HashMap<String, String>(); epSettings.put("protect.datatype", config.getString("protect.datatype", "sqlite")); epSettings.put("protect.username", config.getString("protect.username", "root")); epSettings.put("protect.password", config.getString("protect.password", "root")); epSettings.put( "protect.mysqlDb", config.getString("protect.mysqlDb", "jdbc:mysql://localhost:3306/minecraft")); return epSettings; }
public final String getUserByAddress(final String search) { final List<String> usernames = users.getKeys(null); for (String username : usernames) { final String address = users.getString(username + "." + ADDRESS, null); if (address != null && search.equalsIgnoreCase(address)) { return username; } } return null; }
public ChatColor getOperatorColor() throws Exception { String colorName = config.getString("ops-name-color", null); if (colorName == null) return ChatColor.RED; if ("none".equalsIgnoreCase(colorName) || colorName.isEmpty()) throw new Exception(); try { return ChatColor.valueOf(colorName.toUpperCase()); } catch (IllegalArgumentException ex) { } return ChatColor.getByCode(Integer.parseInt(colorName, 16)); }
public List<Integer> epBlockBreakingBlacklist() { final List<Integer> epBreakList = new ArrayList<Integer>(); for (String itemName : config.getString("protect.blacklist.break", "").split(",")) { itemName = itemName.trim(); if (itemName.isEmpty()) { continue; } ItemStack is; try { is = ItemDb.get(itemName); epBreakList.add(is.getTypeId()); } catch (Exception ex) { logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "blacklist.break")); } } return epBreakList; }
public List<Integer> getEpAlertOnUse() { final List<Integer> epAlertUse = new ArrayList<Integer>(); for (String itemName : config.getString("protect.alert.on-use", "").split(",")) { itemName = itemName.trim(); if (itemName.isEmpty()) { continue; } ItemStack is; try { is = ItemDb.get(itemName); epAlertUse.add(is.getTypeId()); } catch (Exception ex) { logger.log(Level.SEVERE, Util.format("unknownItemInList", itemName, "alert.on-use")); } } return epAlertUse; }
public List<Integer> itemSpawnBlacklist() { final List<Integer> epItemSpwn = new ArrayList<Integer>(); for (String itemName : config.getString("item-spawn-blacklist", "").split(",")) { itemName = itemName.trim(); if (itemName.isEmpty()) { continue; } ItemStack is; try { is = ItemDb.get(itemName); epItemSpwn.add(is.getTypeId()); } catch (Exception ex) { logger.log( Level.SEVERE, Util.format("unknownItemInList", itemName, "item-spawn-blacklist")); } } return epItemSpwn; }
public String getCurrencySymbol() { return config.getString("currency-symbol", "$").substring(0, 1).replaceAll("[0-9]", "$"); }
public String getLocale() { return config.getString("locale", ""); }
private String _getLastLoginAddress() { return config.getString("ipAddress", ""); }
private String _getJail() { return config.getString("jail"); }
public String getChatFormat(String group) { return config.getString( "chat.group-formats." + (group == null ? "Default" : group), config.getString("chat.format", "&7[{GROUP}]&f {DISPLAYNAME}&7:&f {MESSAGE}")); }
public String getBackupCommand() { return config.getString("backup.command", null); }
public String getNetherName() { return config.getString("nether.folder", "nether"); }
public String getNicknamePrefix() { return config.getString("nickname-prefix", "~"); }
public String getCommandPrefix() { return config.getString("command-prefix", ""); }
public boolean getAnnounceNewPlayers() { return !config.getString("newbies.announce-format", "-").isEmpty(); }
public String _getNickname() { return config.getString("nickname"); }
public String getAnnounceNewPlayerFormat(IUser user) { return format( config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"), user); }
public String getBanReason() { return config.getString("ban.reason", ""); }
public String getNewbieSpawn() { return config.getString("newbies.spawnpoint", "default"); }
private String _getGeoLocation() { return config.getString("geolocation"); }
public final String getAddress(final String username) { return users.getString(username.toLowerCase() + "." + ADDRESS, null); }