getConfig().getString() not executing!

Discussion in 'Plugin Development' started by LandonTheGeek, Jun 12, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    LandonTheGeek

    Hey!

    So, I have custom Config String for, hey, you don't have permission. Now, it's not working! It's giving me the normal "Contact and administrator for assistance." error.

    Can you guys take a look at this? Thank you!


    Code:
    else {
            player.sendMessage(ChatColor.translateAlternateColorCodes('&', getConfig().getString("PermissionDenialMessage")));
          }
    Code:
    PermissionDenialMessage: "&8[&9EasyBroadcast&8]&7: Permission denied!"
     
  2. Offline

    kreashenz

    I don't think this'll make a difference, but instead of using "message" use 'message'
     
  3. Offline

    LandonTheGeek

    kreashenz
    Yeah, it automatically changes it, so I'm not worried. Just about this part. :p
     
  4. Offline

    kreashenz

    xXTh3B3astXxify Is it a Bukkit command you're trying to override or something? What command/s are you trying to make?
     
  5. Offline

    LandonTheGeek

    kreashenz
    It is the else { permission statement. If you player doesn't have permission, it executed the configurable message. :)
     
  6. Offline

    psycowithespn

    If you define the command in plugin.yml with a permission tag, then Bukkit will do the permission check for you displaying that "contact an administrator..." message if they don't have permission. Your solution would be to remove that permission tag and do the permission check yourself in onCommand().
     
Thread Status:
Not open for further replies.

Share This Page