From 624af03f08c247abf2444461fbbe070e78881e42 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 19 Jan 2020 11:27:24 +0100 Subject: [PATCH] Bypass Map decision if there is only one arena --- src/de/steamwar/bungeecore/commands/FightCommand.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/FightCommand.java b/src/de/steamwar/bungeecore/commands/FightCommand.java index bc203f2..88cfc6b 100644 --- a/src/de/steamwar/bungeecore/commands/FightCommand.java +++ b/src/de/steamwar/bungeecore/commands/FightCommand.java @@ -119,12 +119,16 @@ public class FightCommand extends BasicCommand { if(mode == null) return; - if(args.length < startArg+2){ + String map; + if(mode.getMaps().size() == 1){ + map = mode.getRandomMap(); + }else if(args.length < startArg+2){ getMaps(sender, precommand, mode); return; + }else{ + map = getMap(sender, mode, args[startArg+1]); } - String map = getMap(sender, mode, args[startArg+1]); if(map == null) return;