From 82edbf220f612432b172835de1ea21ce96795b95 Mon Sep 17 00:00:00 2001 From: Electroid Date: Wed, 7 Jun 2017 13:31:03 -0700 Subject: [PATCH] Allow players to join team blitz mid-match --- PGM/src/main/java/tc/oc/pgm/blitz/BlitzMatchModuleImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PGM/src/main/java/tc/oc/pgm/blitz/BlitzMatchModuleImpl.java b/PGM/src/main/java/tc/oc/pgm/blitz/BlitzMatchModuleImpl.java index 8f0ae0c..9e4c712 100644 --- a/PGM/src/main/java/tc/oc/pgm/blitz/BlitzMatchModuleImpl.java +++ b/PGM/src/main/java/tc/oc/pgm/blitz/BlitzMatchModuleImpl.java @@ -248,7 +248,8 @@ public class BlitzMatchModuleImpl extends MatchModule implements BlitzMatchModul public JoinResult queryJoin(MatchPlayer joining, JoinRequest request) { if(activated() && match.hasStarted() && - !EnumSet.of(JoinMethod.FORCE, JoinMethod.REMOTE).contains(request.method())) { + !EnumSet.of(JoinMethod.FORCE, JoinMethod.REMOTE).contains(request.method()) && + request.competitor().map(this::lives).map(opt -> !opt.map(Lives::empty).orElse(false)).orElse(true)) { // This message should NOT look like an error, because remotely joining players will see it often. // It also should not say "Blitz" because not all maps that use this module want to be labelled "Blitz". return JoinDenied.friendly("command.gameplay.join.matchStarted");