plugins - Bukkit - Compare config string with argument -
I get this weird bug I have this code, which compares the password to the logic given in the configured file: If (label.equalsIgnoreCase ("login")) {if (conconfig (.) Getstring ("player." + P.getName () + ". Password") == Args [ 0]) {p.sendMessage ("OK!"); } And {p.sendMessage ("Not Right!"); }
But it does not matter that it is "not right!" Tell me, what am I doing wrong? Ive tried to argue it, to send a message with the given logic and what she sees in the config file. They were both the same!
You should try
string configValue = config.getString ("player." + P.getName () + ".password"); If (configValue! = Null & amp; configValue.equals (args [0]) {// You may have your idea / xy & lt; password & gt; or / Xy z & lt; password & Gt; p.send Message ("OK!");} And {p.sendMessage ("Not OK!");}
Comments
Post a Comment