Fix /team leave xyz - should just send a message, not make you leave the team

This commit is contained in:
UnknownShadow200 2017-07-31 16:50:12 +10:00
parent 167b3f5f6d
commit 244146c8b1

View File

@ -165,6 +165,11 @@ namespace MCGalaxy.Commands.Fun {
Team team = p.Game.Team;
if (team == null) { Player.Message(p, "You need to be in a team first to leave one."); return; }
// handle /team leave me alone
if (args.Length > 1) {
team.Chat(p, args.Join(" ")); return;
}
team.Action(p, "left the team.");
team.Remove(p.name);
p.Game.Team = null;