geforkt von SteamWar/BungeeCore
Add "YOYONOW"
Dieser Commit ist enthalten in:
Ursprung
ef3c04a442
Commit
54ed8924a6
@ -25,6 +25,7 @@ import java.util.concurrent.TimeUnit;
|
||||
public class ChatListener extends BasicListener {
|
||||
|
||||
private static final Title LIXFEL = ProxyServer.getInstance().createTitle().fadeIn(5).fadeOut(20).stay(30).title(TextComponent.fromLegacyText("§4§lLIXFEL"));
|
||||
private static final Title YOYONOW = ProxyServer.getInstance().createTitle().fadeIn(5).fadeOut(20).stay(30).title(TextComponent.fromLegacyText("§4§lYOYONOW"));
|
||||
|
||||
@EventHandler
|
||||
public void onChatEvent(ChatEvent e){
|
||||
@ -75,7 +76,7 @@ public class ChatListener extends BasicListener {
|
||||
}
|
||||
}
|
||||
|
||||
private void lixfelAlert(ProxiedPlayer sender){
|
||||
private void lixfelAlert(ProxiedPlayer sender) {
|
||||
LIXFEL.send(sender);
|
||||
final String l = "§8Lixfel»" + sender.getName() + " §c";
|
||||
BungeeCore.send(sender, ChatMessageType.ACTION_BAR, "§4§lTechnische Probleme?");
|
||||
@ -87,12 +88,25 @@ public class ChatListener extends BasicListener {
|
||||
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Ich wünsche dir noch weiterhin ein reibungsloses Spielerlebnis."), 15, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private void yoyonowAlert(ProxiedPlayer sender) {
|
||||
YOYONOW.send(sender);
|
||||
final String l = "§8YoyoNow»" + sender.getName() + " §c";
|
||||
BungeeCore.send(sender, ChatMessageType.ACTION_BAR, "§4§lTechnische Probleme?");
|
||||
TaskScheduler scheduler = ProxyServer.getInstance().getScheduler();
|
||||
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Du hast mich gerufen!"), 3, TimeUnit.SECONDS);
|
||||
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Ich würde dir gerne den Befehl \"/bug <MESSAGE>\" ans Herz legen."), 10, TimeUnit.SECONDS);
|
||||
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Vielen Dank."), 12, TimeUnit.SECONDS);
|
||||
scheduler.schedule(BungeeCore.get(), () -> BungeeCore.send(sender, l + "Ich wünsche dir noch weiterhin ein reibungsloses Spielerlebnis."), 15, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private void onChat(ChatEvent e){
|
||||
if(e.getSender() instanceof ProxiedPlayer){
|
||||
ProxiedPlayer sender = (ProxiedPlayer) e.getSender();
|
||||
|
||||
if(e.getMessage().contains("LIXFEL"))
|
||||
if (e.getMessage().contains("LIXFEL"))
|
||||
lixfelAlert(sender);
|
||||
if (e.getMessage().contains("YOYONOW"))
|
||||
yoyonowAlert(sender);
|
||||
|
||||
if(sender.getChatMode() != ProxiedPlayer.ChatMode.SHOWN){
|
||||
BungeeCore.send(sender, BungeeCore.CHAT_PREFIX + "§cUm Chatnachrichten versenden zu können, musst du auch welche empfangen!");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren