質問編集履歴
1
Mainクラスのコード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -372,6 +372,88 @@
|
|
372
372
|
|
373
373
|
|
374
374
|
|
375
|
+
```Main
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
import java.util.Scanner;
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
public class Main {
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
public static void main(String[] args) {
|
388
|
+
|
389
|
+
getLogger.info("ゲームサーバー起動処理開始...");
|
390
|
+
|
391
|
+
onEnableProcessing.onEnable();
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
}
|
396
|
+
|
397
|
+
|
398
|
+
|
399
|
+
static void onInputCommands() {
|
400
|
+
|
401
|
+
System.out.print(">");
|
402
|
+
|
403
|
+
Scanner scanner = new Scanner(System.in);
|
404
|
+
|
405
|
+
String input = scanner.nextLine();
|
406
|
+
|
407
|
+
SaveLogs.saveLog(">" + input);
|
408
|
+
|
409
|
+
commands(input);
|
410
|
+
|
411
|
+
}
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
static void commands(String command) {
|
416
|
+
|
417
|
+
if (command.equalsIgnoreCase("stop")) { //サーバーの停止
|
418
|
+
|
419
|
+
commands.stop();
|
420
|
+
|
421
|
+
} else if (command.equalsIgnoreCase("setMaintenance")) { //メンテナンスモードを設定
|
422
|
+
|
423
|
+
commands.SetMaintenance();
|
424
|
+
|
425
|
+
} else if (command.equalsIgnoreCase("checkMaintenance")) { //メンテナンスモードを確認
|
426
|
+
|
427
|
+
commands.maintenanceCheck();
|
428
|
+
|
429
|
+
} else if (command.contains("brc ")) { //運営からのお知らせコマンド(brc があれば)
|
430
|
+
|
431
|
+
String contains = command.replace("brc ", ""); //brc を空白に置き換え
|
432
|
+
|
433
|
+
SaveNotification.onSave(contains);
|
434
|
+
|
435
|
+
} else if (command.equalsIgnoreCase("help")) {
|
436
|
+
|
437
|
+
commands.help();
|
438
|
+
|
439
|
+
} else {
|
440
|
+
|
441
|
+
getLogger.info("コマンドが間違っています。");
|
442
|
+
|
443
|
+
getLogger.info("helpでヒントを表示します。");
|
444
|
+
|
445
|
+
}
|
446
|
+
|
447
|
+
onInputCommands();
|
448
|
+
|
449
|
+
}
|
450
|
+
|
451
|
+
}
|
452
|
+
|
453
|
+
```
|
454
|
+
|
455
|
+
|
456
|
+
|
375
457
|
### 試したこと
|
376
458
|
|
377
459
|
・pom.xmlのdependencyのartifactIDをmysqlにしてみたりmysql-connector-javaにしてみたが変わらず
|