Remove all space

This commit is contained in:
Sebastien 2018-05-03 10:37:31 +02:00
parent 91f35592f4
commit bb68efc27d

View File

@ -108,6 +108,7 @@ public class Preference implements Commande {
GuildPreferenceEntity pref = getPreference(event.getGuild());
switch (key){
case "anti_spam":
value = value.replaceAll(" ", "");
if(value.toLowerCase().equals("true") || value.toLowerCase().equals("false")){
boolean result = Boolean.parseBoolean(value);
pref.setAntiSpam(result);
@ -125,6 +126,7 @@ public class Preference implements Commande {
case "default_role":
value = value.replaceAll(" ", "");
if(value.toLowerCase().equals("true") || value.toLowerCase().equals("false")){
boolean result = Boolean.parseBoolean(value);
pref.setDefaultRole(result);
@ -163,6 +165,7 @@ public class Preference implements Commande {
break;
case "welcome":
value = value.replaceAll(" ", "");
if(value.toLowerCase().equals("true") || value.toLowerCase().equals("false")){
boolean result = Boolean.parseBoolean(value);
pref.setWelcome(result);