1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-09-26 06:09:15 +02:00

Add 'color' sign type to config file.

Enforce colour permission on signs when essentials signs are enabled.
This commit is contained in:
KHobbits
2012-03-19 08:21:39 +00:00
parent 519a5c34d1
commit 5eb6e886a8
4 changed files with 22 additions and 3 deletions

View File

@@ -303,7 +303,7 @@ public class Settings implements ISettings
@Override
public boolean areSignsDisabled()
{
return enabledSigns.isEmpty();
return !signsEnabled;
}
@Override
@@ -422,6 +422,7 @@ public class Settings implements ISettings
return epItemSpwn;
}
private List<EssentialsSign> enabledSigns = new ArrayList<EssentialsSign>();
private boolean signsEnabled = false;
@Override
public List<EssentialsSign> enabledSigns()
@@ -440,6 +441,11 @@ public class Settings implements ISettings
{
continue;
}
if (signName.equals("COLOR") || signName.equals("COLOUR"))
{
signsEnabled = true;
continue;
}
try
{
newSigns.add(Signs.valueOf(signName).getSign());
@@ -447,7 +453,9 @@ public class Settings implements ISettings
catch (Exception ex)
{
logger.log(Level.SEVERE, _("unknownItemInList", signName, "enabledSigns"));
continue;
}
signsEnabled = true;
}
return newSigns;
}