[SOLVED] Config Help

Discussion in 'Spigot Help' started by LazerShadow, May 30, 2015.

  1. So I am making a plugin, where when you kill a player it gives you 10 currency. It works fine, I want to make a command where you can check how much currency you have.

    Here is what my Config looks like:
    Code (Text):
    # Creative Times Config
      Currency: 250
      Currency: 130
    Here is my command I tried:
    Code (Text):
    if (cmd.getName().equalsIgnoreCase("currency") && sender instanceof Player) {
                Player player = (Player) sender;
                player.sendMessage("Currency:" + getConfig().getInt("Currency"));
                return true;
    Obviously I need to check what player it is, and I don't know how to do that. So basically what I need you to tell me is how to fix my command.

    Also keep in mind I am pretty new to Java.
  2. "Currency" is not the path to what you are trying to get
  3. Add in before "Currency", player.getName() or something.