mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
96fdf265d5
Fixes #2080
31 lines
973 B
Java
31 lines
973 B
Java
package com.gmail.nossr50.chat;
|
|
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
import com.gmail.nossr50.config.Config;
|
|
import com.gmail.nossr50.datatypes.party.Party;
|
|
import com.gmail.nossr50.events.chat.McMMOPartyChatEvent;
|
|
import com.gmail.nossr50.runnables.party.PartyChatTask;
|
|
|
|
public class PartyChatManager extends ChatManager {
|
|
private Party party;
|
|
|
|
protected PartyChatManager(Plugin plugin) {
|
|
super(plugin, Config.getInstance().getPartyDisplayNames(), Config.getInstance().getPartyChatPrefix());
|
|
}
|
|
|
|
public void setParty(Party party) {
|
|
this.party = party;
|
|
}
|
|
|
|
@Override
|
|
public void handleChat(String senderName, String displayName, String message, boolean isAsync) {
|
|
handleChat(new McMMOPartyChatEvent(plugin, senderName, displayName, party.getName(), message, isAsync));
|
|
}
|
|
|
|
@Override
|
|
protected void sendMessage() {
|
|
new PartyChatTask(plugin, party, senderName, displayName, message).runTask(plugin);
|
|
}
|
|
}
|