forked from ChomeNS/chomens-bot-java
remove clear chat username
too many problems
This commit is contained in:
parent
3246702fb4
commit
0abd349b7a
2 changed files with 0 additions and 40 deletions
|
@ -62,7 +62,6 @@ public class Bot {
|
|||
@Getter private MusicPlayerPlugin music;
|
||||
@Getter private TPSPlugin tps;
|
||||
@Getter private EvalRunnerPlugin eval;
|
||||
@Getter private ClearChatUsernamePlugin clearChatUsername;
|
||||
@Getter private TrustedPlugin trusted;
|
||||
@Getter private BruhifyPlugin bruhify;
|
||||
@Getter private GrepLogPlugin grepLog;
|
||||
|
@ -109,7 +108,6 @@ public class Bot {
|
|||
this.music = new MusicPlayerPlugin(this);
|
||||
this.tps = new TPSPlugin(this);
|
||||
this.eval = new EvalRunnerPlugin(this);
|
||||
this.clearChatUsername = new ClearChatUsernamePlugin(this);
|
||||
this.trusted = new TrustedPlugin(this);
|
||||
this.bruhify = new BruhifyPlugin(this);
|
||||
this.grepLog = new GrepLogPlugin(this);
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
package land.chipmunk.chayapak.chomens_bot.plugins;
|
||||
|
||||
import land.chipmunk.chayapak.chomens_bot.Bot;
|
||||
import land.chipmunk.chayapak.chomens_bot.data.chat.PlayerMessage;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextComponent;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
// idea totallynotskidded™ from chipmunkbot (the js one)
|
||||
public class ClearChatUsernamePlugin extends ChatPlugin.Listener {
|
||||
private final Bot bot;
|
||||
|
||||
public ClearChatUsernamePlugin(Bot bot) {
|
||||
this.bot = bot;
|
||||
|
||||
bot.chat().addListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commandSpyMessageReceived (PlayerMessage message) {
|
||||
final String username = message.sender().profile().getName();
|
||||
final String command = ((TextComponent) message.contents()).content();
|
||||
|
||||
if (
|
||||
command.startsWith("/cc") ||
|
||||
command.startsWith("/clearchat") ||
|
||||
command.startsWith("/extras:cc") ||
|
||||
command.startsWith("/extras:clearchat")
|
||||
) {
|
||||
bot.chat().tellraw(
|
||||
Component.empty()
|
||||
.append(Component.text(username))
|
||||
.append(Component.text(" cleared the chat"))
|
||||
.color(NamedTextColor.DARK_GREEN)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue