From 584ea774192d961cad01fce429407f34507022ce Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 16 Oct 2023 23:50:52 +0200 Subject: [PATCH] Hotfix: Fix addTeam in public --- .../commands/schematiccommand/parts/MemberPart.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java index cf1884f..f7f09ac 100644 --- a/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java +++ b/SchematicSystem_Core/src/de/steamwar/schematicsystem/commands/schematiccommand/parts/MemberPart.java @@ -116,7 +116,7 @@ public class MemberPart extends SWCommand { public void addTeam(Player player, @Validator("isOwnerValidator") SchematicNode node) { SteamwarUser user = getUser(player); Team team = Team.get(user.getTeam()); - if (team == null) { + if (team == null || team.getTeamId() == 0) { SchematicSystem.MESSAGE.send("COMMAND_ADD_TEAM_NOT_IN_TEAM", player); return; } @@ -128,7 +128,7 @@ public class MemberPart extends SWCommand { public void remTeam(Player player, @Validator("isOwnerValidator") SchematicNode node) { SteamwarUser user = getUser(player); Team team = Team.get(user.getTeam()); - if (team == null) { + if (team == null || team.getTeamId() == 0) { SchematicSystem.MESSAGE.send("COMMAND_DEL_TEAM_NOT_IN_TEAM", player); return; }