Re-ignore case for name, Security issues T.T

This commit is contained in:
Xephi
2015-04-21 16:21:26 +02:00
parent 605a6d88c1
commit 84cf1a6627
37 changed files with 144 additions and 169 deletions
@@ -78,16 +78,6 @@ public class CustomConfiguration extends YamlConfiguration {
Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, "Failed to load config from JAR");
out = false;
}
/*
* FileOutputStream fos = null; try { fos = new
* FileOutputStream(file); byte[] buf = new byte[1024]; int i = 0;
* while ((i = fis.read(buf)) != -1) { fos.write(buf, 0, i); } }
* catch (Exception e) {
* Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE,
* "Failed to load config from JAR"); out = false; } finally { try {
* if (fis != null) { fis.close(); } if (fos != null) { fos.close();
* } } catch (Exception e) { } } }
*/
}
return out;
}
@@ -35,8 +35,8 @@ public class PlayersLogs extends CustomConfiguration {
public void addPlayer(String user) {
players = this.getStringList("players");
if (!players.contains(user)) {
players.add(user);
if (!players.contains(user.toLowerCase())) {
players.add(user.toLowerCase());
set("players", players);
save();
}
@@ -44,8 +44,8 @@ public class PlayersLogs extends CustomConfiguration {
public void removePlayer(String user) {
players = this.getStringList("players");
if (players.contains(user)) {
players.remove(user);
if (players.contains(user.toLowerCase())) {
players.remove(user.toLowerCase());
set("players", players);
save();
}