1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-11 00:55:10 +02:00

Add chat configurables.

This commit is contained in:
KHobbits
2014-03-30 15:50:32 +01:00
parent 9fb5b3cef4
commit 51a6ae2cf0
4 changed files with 43 additions and 7 deletions

View File

@@ -33,7 +33,6 @@ public class EssentialsChat extends JavaPlugin
final Map<AsyncPlayerChatEvent, ChatStore> chatStore = Collections.synchronizedMap(new HashMap<AsyncPlayerChatEvent, ChatStore>());
final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, chatStore);
final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, chatStore);
final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, chatStore);

View File

@@ -47,15 +47,18 @@ public abstract class EssentialsChatPlayer implements Listener
//Ignore empty chat events generated by plugins
return "";
}
switch (message.charAt(0))
final char prefix = message.charAt(0);
if (prefix == ess.getSettings().getChatShout())
{
case '!':
return "shout";
case '?':
}
else if (prefix == ess.getSettings().getChatQuestion())
{
return "question";
//case '@':
//return "admin";
default:
}
else
{
return "";
}
}