mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-26 15:33:56 +00:00
Added overridden-commands. Commands beginning with /e will also give Essentials precedence.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1193 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
7463d06594
commit
a8ef55e057
5 changed files with 52 additions and 19 deletions
|
@ -98,6 +98,19 @@ public class Settings implements IConf
|
|||
return config.getBoolean("restrict-" + label.toLowerCase(), false);
|
||||
}
|
||||
|
||||
public boolean isCommandOverridden(String name)
|
||||
{
|
||||
List<String> defaultList = new ArrayList<String>(1);
|
||||
defaultList.add("god");
|
||||
for (String c : config.getStringList("overridden-commands", defaultList))
|
||||
{
|
||||
if (!c.equalsIgnoreCase(name))
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
return config.getBoolean("override-" + name.toLowerCase(), false);
|
||||
}
|
||||
|
||||
public int getCommandCost(IEssentialsCommand cmd)
|
||||
{
|
||||
return getCommandCost(cmd.getName());
|
||||
|
@ -436,12 +449,12 @@ public class Settings implements IConf
|
|||
return epBreakList;
|
||||
}
|
||||
|
||||
public Boolean spawnIfNoHome()
|
||||
public boolean spawnIfNoHome()
|
||||
{
|
||||
return config.getBoolean("spawn-if-no-home", false);
|
||||
}
|
||||
|
||||
public Boolean warnOnBuildDisallow()
|
||||
public boolean warnOnBuildDisallow()
|
||||
{
|
||||
return config.getBoolean("warn-on-build-disallow", false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue