Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
  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));
  }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
 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;
 }
Esempio n. 7
0
 public String getCurrencySymbol() {
   return config.getString("currency-symbol", "$").substring(0, 1).replaceAll("[0-9]", "$");
 }
Esempio n. 8
0
 public String getLocale() {
   return config.getString("locale", "");
 }
Esempio n. 9
0
	private String _getLastLoginAddress()
	{
		return config.getString("ipAddress", "");
	}
Esempio n. 10
0
	private String _getJail()
	{
		return config.getString("jail");
	}
Esempio n. 11
0
 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}"));
 }
Esempio n. 12
0
 public String getBackupCommand() {
   return config.getString("backup.command", null);
 }
Esempio n. 13
0
 public String getNetherName() {
   return config.getString("nether.folder", "nether");
 }
Esempio n. 14
0
 public String getNicknamePrefix() {
   return config.getString("nickname-prefix", "~");
 }
Esempio n. 15
0
 public String getCommandPrefix() {
   return config.getString("command-prefix", "");
 }
Esempio n. 16
0
 public boolean getAnnounceNewPlayers() {
   return !config.getString("newbies.announce-format", "-").isEmpty();
 }
Esempio n. 17
0
	public String _getNickname()
	{
		return config.getString("nickname");
	}
Esempio n. 18
0
 public String getAnnounceNewPlayerFormat(IUser user) {
   return format(
       config.getString("newbies.announce-format", "&dWelcome {DISPLAYNAME} to the server!"),
       user);
 }
Esempio n. 19
0
	public String getBanReason()
	{
		return config.getString("ban.reason", "");
	}
Esempio n. 20
0
 public String getNewbieSpawn() {
   return config.getString("newbies.spawnpoint", "default");
 }
Esempio n. 21
0
	private String _getGeoLocation()
	{
		return config.getString("geolocation");
	}
Esempio n. 22
0
 public final String getAddress(final String username) {
   return users.getString(username.toLowerCase() + "." + ADDRESS, null);
 }