2013-02-02 06:09:47 +01:00
|
|
|
package com.gmail.nossr50.chat.commands;
|
2012-01-09 20:00:13 +01:00
|
|
|
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2012-06-07 00:02:22 +02:00
|
|
|
import com.gmail.nossr50.mcMMO;
|
2013-02-02 06:09:47 +01:00
|
|
|
import com.gmail.nossr50.chat.ChatManager;
|
2013-02-07 21:59:18 +01:00
|
|
|
import com.gmail.nossr50.chat.ChatMode;
|
2012-04-27 11:47:11 +02:00
|
|
|
import com.gmail.nossr50.locale.LocaleLoader;
|
2012-01-09 20:00:13 +01:00
|
|
|
|
2013-02-07 21:59:18 +01:00
|
|
|
public class AdminChatCommand extends ChatCommand {
|
|
|
|
public AdminChatCommand() {
|
|
|
|
super(ChatMode.ADMIN);
|
|
|
|
}
|
2012-07-05 15:21:07 +02:00
|
|
|
|
2013-02-07 21:59:18 +01:00
|
|
|
@Override
|
|
|
|
protected void handleChatSending(CommandSender sender, String[] args) {
|
|
|
|
if (sender instanceof Player) {
|
|
|
|
Player player = (Player) sender;
|
2013-02-24 19:25:35 +01:00
|
|
|
ChatManager.handleAdminChat(mcMMO.p, player.getName(), player.getDisplayName(), buildChatMessage(args, 0));
|
2013-02-07 21:59:18 +01:00
|
|
|
}
|
|
|
|
else {
|
2013-02-24 19:25:35 +01:00
|
|
|
ChatManager.handleAdminChat(mcMMO.p, LocaleLoader.getString("Commands.Chat.Console"), buildChatMessage(args, 0));
|
2012-04-21 00:09:50 +02:00
|
|
|
}
|
|
|
|
}
|
2012-01-09 20:00:13 +01:00
|
|
|
}
|