File tree Expand file tree Collapse file tree
src/main/java/net/azisaba/lgw/core/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,14 @@ public enum MatchMode {
4949 Chat .f ("&7終了時に &cキャプチャーポイント &7が多いチームの勝利" ),
5050 Duration .ofMinutes (10 ),
5151 Arrays .asList ("hijack" , "hj" , "h" )
52+ ),
53+
54+ RANDOM (
55+ Chat .f ("&7ランダム" ),
56+ Chat .f ("&7RANDOM" ),
57+ Chat .f ("&7ランダムでモードを選択" ),
58+ Duration .ofMinutes (10 ),
59+ Arrays .asList ("random" , "r" )
5260 );
5361
5462
@@ -67,7 +75,9 @@ public enum MatchMode {
6775 }
6876
6977 public static MatchMode getFromString (String text ) {
70- if (text .equalsIgnoreCase ("[random]" ) || text .equalsIgnoreCase ("r" )) {
78+ String suggest = text .replace (" " , "" ).toLowerCase ();
79+
80+ if (text .equalsIgnoreCase ("r" )) {
7181 int rand = (int ) (Math .random () * 2 );
7282 if (rand == 0 ) {
7383 return LEADER_DEATH_MATCH_POINT ;
@@ -76,7 +86,6 @@ public static MatchMode getFromString(String text) {
7686 }
7787 }
7888
79- String suggest = text .replace (" " , "" ).toLowerCase ();
8089 return Arrays .stream (values ())
8190 .filter (mode -> mode .suggests .contains (suggest ))
8291 .findAny ()
You can’t perform that action at this time.
0 commit comments