mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
Added ability to disable nicknames by adding /nick to the disabled commands list
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1180 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
8641290caa
commit
ef29285239
1
Essentials/nbproject/private/private.properties
Normal file
1
Essentials/nbproject/private/private.properties
Normal file
@ -0,0 +1 @@
|
||||
user.properties.file=C:\\Users\\Paul\\.netbeans\\7.0beta2\\build.properties
|
7
Essentials/nbproject/private/private.xml
Normal file
7
Essentials/nbproject/private/private.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
|
||||
<file>file:/C:/Users/Paul/Documents/NetBeansProjects/essentials~svn/trunk/Essentials/src/com/earth2me/essentials/Mob.java</file>
|
||||
</open-files>
|
||||
</project-private>
|
@ -59,40 +59,10 @@ public class Essentials extends JavaPlugin
|
||||
Essentials ess = (Essentials)pm.getPlugin("Essentials");
|
||||
if (!ess.isEnabled())
|
||||
pm.enablePlugin(ess);
|
||||
loadClasses();
|
||||
}
|
||||
|
||||
@SuppressWarnings("CallToThreadDumpStack")
|
||||
public static void loadClasses()
|
||||
{
|
||||
return;
|
||||
/*final String[] classes = new String[]
|
||||
{
|
||||
"commands.IEssentialsCommand",
|
||||
"commands.EssentialsCommand",
|
||||
"User",
|
||||
"TargetBlock",
|
||||
"Spawn",
|
||||
"Settings",
|
||||
"OfflinePlayer",
|
||||
"ItemDb",
|
||||
"Mob",
|
||||
"EssentialsBlockListener",
|
||||
"EssentialsBlockListener$1",
|
||||
"EssentialsBlockListener$2",
|
||||
"EssentialsPlayerListener",
|
||||
"Backup"
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
for (String c : classes)
|
||||
Essentials.class.getClassLoader().loadClass("com.earth2me.essentials." + c);
|
||||
}
|
||||
catch (Throwable ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}*/
|
||||
}
|
||||
|
||||
public static Essentials getStatic()
|
||||
|
@ -678,7 +678,7 @@ public class User extends PlayerExtension implements Comparable<User>, IReplyTo
|
||||
public String getNick()
|
||||
{
|
||||
Essentials ess = Essentials.getStatic();
|
||||
String name = ess.getConfiguration().getBoolean("disable-nick", false) ? getName() : ess.readNickname(this);
|
||||
String name = Essentials.getSettings().isCommandDisabled("nick") ? getName() : ess.readNickname(this);
|
||||
if (isOp() && ess.getConfiguration().getString("ops-name-color", "c").matches("^[0-9a-f]$")) {
|
||||
name = "§" + ess.getConfiguration().getString("ops-name-color", "c") + name + "§f";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user