geforkt von SteamWar/BungeeCore
Add EventModeListener MultiLang
Dieser Commit ist enthalten in:
Ursprung
fa9f4f7e79
Commit
11a339f785
@ -1,25 +1,23 @@
|
||||
package de.steamwar.bungeecore.listeners;
|
||||
|
||||
import de.steamwar.bungeecore.Message;
|
||||
import de.steamwar.bungeecore.sql.Event;
|
||||
import de.steamwar.bungeecore.sql.EventFight;
|
||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||
import de.steamwar.bungeecore.sql.TeamTeilnahme;
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import net.md_5.bungee.api.chat.TextComponent;
|
||||
import net.md_5.bungee.api.event.PostLoginEvent;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
|
||||
public class EventModeListener extends BasicListener {
|
||||
|
||||
private static final BaseComponent[] nonParticipant = TextComponent.fromLegacyText("§cDu bist kein Eventteilnehmer.");
|
||||
|
||||
@EventHandler
|
||||
public void onPostLogin(PostLoginEvent e) {
|
||||
SteamwarUser user = SteamwarUser.get(e.getPlayer().getUniqueId());
|
||||
|
||||
Event event = Event.get();
|
||||
if(event == null){
|
||||
e.getPlayer().disconnect(nonParticipant);
|
||||
e.getPlayer().disconnect(TextComponent.fromLegacyText(Message.parse("EVENTMODE_KICK", e.getPlayer())));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -31,6 +29,6 @@ public class EventModeListener extends BasicListener {
|
||||
return;
|
||||
}
|
||||
|
||||
e.getPlayer().disconnect(nonParticipant);
|
||||
e.getPlayer().disconnect(TextComponent.fromLegacyText(Message.parse("EVENTMODE_KICK", e.getPlayer())));
|
||||
}
|
||||
}
|
||||
|
@ -440,3 +440,6 @@ CHECK_UNCHECKED=§7Du hast noch §e{0} §7ungeprüfte Schematic§8(§7s§8)!
|
||||
JOIN_ARENA=§7Klicke §ehier§7, um §e{0} §7beizutreten
|
||||
JOIN_ARENA_HOVER=§eArena beitreten
|
||||
JOIN_FIRST=§7Begrüßt alle mal §e{0} §7auf dem Server§8!
|
||||
|
||||
#EventModeListener
|
||||
EVENTMODE_KICK=§cDu bist kein Eventteilnehmer.
|
In neuem Issue referenzieren
Einen Benutzer sperren