mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Fix command costs warnings.
This commit is contained in:
parent
00bd6a3e02
commit
bd4a48c441
1 changed files with 5 additions and 1 deletions
|
@ -191,10 +191,14 @@ public class Settings implements ISettings
|
||||||
for (String command : section.getKeys(false))
|
for (String command : section.getKeys(false))
|
||||||
{
|
{
|
||||||
PluginCommand cmd = ess.getServer().getPluginCommand(command);
|
PluginCommand cmd = ess.getServer().getPluginCommand(command);
|
||||||
if (cmd == null || !cmd.getPlugin().equals(ess))
|
if (cmd != null && !cmd.getPlugin().equals(ess))
|
||||||
{
|
{
|
||||||
ess.getLogger().warning("Invalid command cost. '" + command + "' is not a command handled by Essentials.");
|
ess.getLogger().warning("Invalid command cost. '" + command + "' is not a command handled by Essentials.");
|
||||||
}
|
}
|
||||||
|
else if (command.charAt(0) == '/')
|
||||||
|
{
|
||||||
|
ess.getLogger().warning("Invalid command cost. '" + command + "' should not start with '/'.");
|
||||||
|
}
|
||||||
if (section.isDouble(command))
|
if (section.isDouble(command))
|
||||||
{
|
{
|
||||||
newSection.set(command.toLowerCase(Locale.ENGLISH), section.getDouble(command));
|
newSection.set(command.toLowerCase(Locale.ENGLISH), section.getDouble(command));
|
||||||
|
|
Loading…
Reference in a new issue