mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-25 19:45:54 +01:00
Tokenizer changes.
This commit is contained in:
parent
3363d71415
commit
d20dbd20ef
@ -22,6 +22,8 @@ import com.dthielke.herochat.ChannelManager;
|
||||
import com.gmail.nossr50.util.player.UserManager;
|
||||
import com.nyancraft.reportrts.data.Ticket;
|
||||
import com.palmergames.bukkit.TownyChat.channels.Channel;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -592,10 +594,12 @@ public class ChatTokenizer {
|
||||
worldAlias = plugin.getWorldAlias(worldName);
|
||||
worldColor = plugin.getWorldColor(worldName);
|
||||
}
|
||||
if (message.contains("%JOBS%") || message.contains("%JOBSSHORT%")) {
|
||||
if (plugin.jobsHook != null) {
|
||||
job = plugin.jobsHook.getPlayerJob(player, false);
|
||||
jobShort = plugin.jobsHook.getPlayerJob(player, true);
|
||||
}
|
||||
}
|
||||
plugin.logDebug("[P]Raw message: " + message);
|
||||
return message.replace("%DISPLAYNAME%", displayName)
|
||||
.replace("%JOBS%", job)
|
||||
@ -624,23 +628,18 @@ public class ChatTokenizer {
|
||||
String group = "";
|
||||
|
||||
if (message.contains("%PLAYERSUFFIX%")) {
|
||||
plugin.logDebug("playerTokenizer: %PLAYERSUFFIX%");
|
||||
pSuffix = plugin.getPlayerSuffix(worldName, playerName);
|
||||
}
|
||||
if (message.contains("%PLAYERPREFIX%")) {
|
||||
plugin.logDebug("playerTokenizer: %PLAYERPREFIX%");
|
||||
pPrefix = plugin.getPlayerPrefix(worldName, playerName);
|
||||
}
|
||||
if (message.contains("%GROUPSUFFIX%")) {
|
||||
plugin.logDebug("playerTokenizer: %GROUPSUFFIX%");
|
||||
gSuffix = plugin.getPlayerSuffix(worldName, playerName);
|
||||
}
|
||||
if (message.contains("%GROUPPREFIX%")) {
|
||||
plugin.logDebug("playerTokenizer: %GROUPPREFIX%");
|
||||
gPrefix = plugin.getPlayerPrefix(worldName, playerName);
|
||||
}
|
||||
if (message.contains("%GROUP%")) {
|
||||
plugin.logDebug("playerTokenizer: %GROUP%");
|
||||
group = plugin.getPlayerGroup(worldName, playerName);
|
||||
}
|
||||
|
||||
@ -676,6 +675,7 @@ public class ChatTokenizer {
|
||||
group = plugin.defaultPlayerGroup;
|
||||
}
|
||||
plugin.logDebug("playerTokenizer: 14 ");
|
||||
if (message.contains("%JOBS%") || message.contains("%JOBSSHORT%")) {
|
||||
Player player = getPlayer(playerName);
|
||||
if (player != null) {
|
||||
if (plugin.jobsHook != null) {
|
||||
@ -683,6 +683,7 @@ public class ChatTokenizer {
|
||||
jobShort = plugin.jobsHook.getPlayerJob(player, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
plugin.logDebug("[S]Raw message: " + message);
|
||||
return message.replace("%DISPLAYNAME%", displayName)
|
||||
.replace("%JOBS%", job)
|
||||
|
Loading…
Reference in New Issue
Block a user