Hotfix message and auto abort
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
d6690736a4
Commit
445bbc6824
@ -23,7 +23,7 @@ public class HistoricCommand extends BasicCommand {
|
||||
FightCommand.createArena(sender, "/historic ", args, 0, true, (player, mode, map) -> {
|
||||
Subserver arena = SubserverSystem.startArena(mode, map, 0, 0, null, null, player.getUniqueId(), null);
|
||||
arena.sendPlayer(player);
|
||||
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Historischer §e" + mode.getDisplayName() + "§8-§7Kampf von §e" + player.getName() + " §8!");
|
||||
TextComponent tc = new TextComponent(BungeeCore.CHAT_PREFIX + "§7Historischer §e" + mode.getDisplayName() + "§8-§7Kampf von §e" + player.getName() + "§8!");
|
||||
tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§aGegen §7" + player.getName() + " §ekämpfen").create()));
|
||||
tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + player.getName()));
|
||||
ProxyServer.getInstance().broadcast(tc);
|
||||
|
@ -1,6 +1,9 @@
|
||||
package de.steamwar.bungeecore.listeners;
|
||||
|
||||
import de.steamwar.bungeecore.Bauserver;
|
||||
import de.steamwar.bungeecore.BungeeCore;
|
||||
import de.steamwar.bungeecore.Servertype;
|
||||
import de.steamwar.bungeecore.Subserver;
|
||||
import de.steamwar.bungeecore.commands.CheckCommand;
|
||||
import de.steamwar.bungeecore.sql.Schematic;
|
||||
import de.steamwar.bungeecore.sql.SchematicType;
|
||||
@ -34,8 +37,15 @@ public class CheckListener extends BasicListener {
|
||||
@EventHandler
|
||||
public void onServerSwitch(ServerSwitchEvent e){
|
||||
ProxiedPlayer player = e.getPlayer();
|
||||
if(CheckCommand.isChecking(player))
|
||||
CheckCommand.abort(player);
|
||||
if(CheckCommand.isChecking(player)){
|
||||
Subserver server = Subserver.getSubserver(player.getServer().getInfo());
|
||||
if(
|
||||
server == null ||
|
||||
server.getType() != Servertype.BAUSERVER ||
|
||||
((Bauserver)server).getOwner() != player.getUniqueId()
|
||||
)
|
||||
CheckCommand.abort(player);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren