From 67695b6ce35296bd64c2a0a041823b4b7c8d1af9 Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 24 Oct 2020 13:14:53 +0200 Subject: [PATCH] Fix Leader remove on /team --- src/de/steamwar/bungeecore/commands/TeamCommand.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index 4d8ff64..601bd58 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -264,6 +264,11 @@ public class TeamCommand extends BasicCommand { return; } + if (team.getTeamLeader() == target.getId()) { + BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cLeader entfernen sich nicht selbst"); + return; + } + if(teamInvitations.containsKey(target.getId())){ if(teamInvitations.get(target.getId()).remove((Integer) team.getTeamId())){ BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Die Einladung wurde zurückgezogen");