summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandcustomtext.java9
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandhelp.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandinfo.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandmotd.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandrules.java5
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignInfo.java1
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java2
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java4
8 files changed, 26 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandcustomtext.java b/Essentials/src/com/earth2me/essentials/commands/Commandcustomtext.java
index 7e3acd643..8f08e3ce0 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandcustomtext.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandcustomtext.java
@@ -18,8 +18,13 @@ public class Commandcustomtext extends EssentialsCommand
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
- {
- final IText input = new TextInput(sender, "custom", true, ess);
+ {
+ if (sender.isPlayer())
+ {
+ ess.getUser(sender.getPlayer()).setDisplayNick();
+ }
+
+ final IText input = new TextInput(sender, "custom", true, ess);
final IText output = new KeywordReplacer(input, sender, ess);
final TextPager pager = new TextPager(output);
String chapter = commandLabel;
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
index 87e2c5b15..d037c3c79 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandhelp.java
@@ -45,6 +45,7 @@ public class Commandhelp extends EssentialsCommand
}
else
{
+ user.setDisplayNick();
output = new KeywordReplacer(input, user.getSource(), ess);
}
final TextPager pager = new TextPager(output);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java b/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
index a8b10cf36..2ee915f7c 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandinfo.java
@@ -18,6 +18,11 @@ public class Commandinfo extends EssentialsCommand
@Override
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
+ if (sender.isPlayer())
+ {
+ ess.getUser(sender.getPlayer()).setDisplayNick();
+ }
+
final IText input = new TextInput(sender, "info", true, ess);
final IText output = new KeywordReplacer(input, sender, ess);
final TextPager pager = new TextPager(output);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
index bbab26ab0..58c8da669 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandmotd.java
@@ -18,6 +18,11 @@ public class Commandmotd extends EssentialsCommand
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
+ if (sender.isPlayer())
+ {
+ ess.getUser(sender.getPlayer()).setDisplayNick();
+ }
+
final IText input = new TextInput(sender, "motd", true, ess);
final IText output = new KeywordReplacer(input, sender, ess);
final TextPager pager = new TextPager(output);
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandrules.java b/Essentials/src/com/earth2me/essentials/commands/Commandrules.java
index 2a3e7a464..51ca08053 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandrules.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandrules.java
@@ -18,6 +18,11 @@ public class Commandrules extends EssentialsCommand
@Override
public void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception
{
+ if (sender.isPlayer())
+ {
+ ess.getUser(sender.getPlayer()).setDisplayNick();
+ }
+
final IText input = new TextInput(sender, "rules", true, ess);
final IText output = new KeywordReplacer(input, sender, ess);
final TextPager pager = new TextPager(output);
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignInfo.java b/Essentials/src/com/earth2me/essentials/signs/SignInfo.java
index 9d6ef8da0..d890b521d 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignInfo.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignInfo.java
@@ -37,6 +37,7 @@ public class SignInfo extends EssentialsSign
final IText input;
try
{
+ player.setDisplayNick();
input = new TextInput(player.getSource(), "info", true, ess);
final IText output = new KeywordReplacer(input, player.getSource(), ess);
final TextPager pager = new TextPager(output);
diff --git a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
index 73dbf0538..683a1fe00 100644
--- a/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
+++ b/Essentials/src/com/earth2me/essentials/textreader/KeywordReplacer.java
@@ -66,8 +66,6 @@ public class KeywordReplacer implements IText
if (sender.isPlayer())
{
user = ess.getUser(sender.getPlayer());
- //This is just so any displayname lookups below show the correct nickname
- user.setDisplayNick();
}
execTimer.mark("User Grab");
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index 648ba33e3..67ef6c28e 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -134,7 +134,7 @@ public class EssentialsSpawnPlayerListener implements Listener
LOGGER.log(Level.FINE, "New player join");
}
- });
+ }, 2L);
}
@@ -150,7 +150,7 @@ public class EssentialsSpawnPlayerListener implements Listener
@Override
public void run()
{
- if (user.getBase() instanceof OfflinePlayer)
+ if (user.getBase() instanceof OfflinePlayer || !user.getBase().isOnline())
{
return;
}