Solved yml file weirdness

Discussion in 'Spigot Plugin Development' started by torpkev, Apr 20, 2020.

  1. EDIT: I restarted the computer, no code changes, no data changes.. and the problem went away. Very weird, not solved, but no way to duplicate it now. Thanks to anyone who took the time to read it.


    I'm reading a .yml file and trying to set some values from it.

    I checked that my yml is valid in an online checker

    Code (YAML):
    : "&2Congratulations &r- Your application has been approved"
    : c7af5f16-be9e-4d95-9edf-a156fef96d04
    : 1
    : 79676510-4007-47f1-ac86-55de2debdee9
    : false
    : 1582196807246
    But I keep hitting an issue where:

    Code (Java):

    if (config.contains("messages." + id + ".message_to")) {
      if (config.isString("messages." + id + ".message_to")) {
        String message_to = config.getString("messages." + id + ".message_to");
        if (message_to != null) {
          messageTo = UUID.fromString(message_to);
    I'm checking to see if it contains the messages, I've breakpointed it and its on


    If I put a watch on it, no issue getting a string


    But stepping through the code, once it hits config.isString() it just jumps out to the next section, leaving me with a null.. If I remove the isString() check, it does the same thing when I try getString()

    I even tried putting this in:

    Code (Java):
    boolean c = false;
    c = config.contains(msgto);
    Logging.log("","C: " + c);
    But stepping through, it just tells me this, even though I know it has to be there:


    I'm obviously missing something painfully obvious, any help would be greatly appreciated.
    #1 torpkev, Apr 20, 2020
    Last edited: Apr 21, 2020