From 99750ca767d4fc861299266e1102b3aeaebedcd7 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 22 Feb 2023 16:18:16 +0100 Subject: [PATCH] Fix Bugs Signed-off-by: Lixfel --- CommonCore | 2 +- src/de/steamwar/bungeecore/ServerStarter.java | 4 ++-- src/de/steamwar/bungeecore/commands/EventCommand.java | 5 ++--- src/de/steamwar/bungeecore/commands/TutorialCommand.java | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CommonCore b/CommonCore index 9b53ad7..588d3c9 160000 --- a/CommonCore +++ b/CommonCore @@ -1 +1 @@ -Subproject commit 9b53ad748b32cc38ade1ccc606b116c0d6fbf1fb +Subproject commit 588d3c9dda47a8e61e4e01eea9c915f9d853eb3b diff --git a/src/de/steamwar/bungeecore/ServerStarter.java b/src/de/steamwar/bungeecore/ServerStarter.java index d2ec14f..48aa65a 100644 --- a/src/de/steamwar/bungeecore/ServerStarter.java +++ b/src/de/steamwar/bungeecore/ServerStarter.java @@ -144,8 +144,8 @@ public class ServerStarter { public ServerStarter tutorial(ProxiedPlayer owner, Tutorial tutorial) { directory = new File(SERVER_PATH, "Tutorial"); buildWithTemp(owner); - tempWorld(TUTORIAL_PATH + tutorial.getId()); - arguments.put("tutorial", String.valueOf(tutorial.getId())); + tempWorld(TUTORIAL_PATH + tutorial.getTutorialId()); + arguments.put("tutorial", String.valueOf(tutorial.getTutorialId())); return send(owner); } diff --git a/src/de/steamwar/bungeecore/commands/EventCommand.java b/src/de/steamwar/bungeecore/commands/EventCommand.java index fd8d88c..9ea7c9b 100644 --- a/src/de/steamwar/bungeecore/commands/EventCommand.java +++ b/src/de/steamwar/bungeecore/commands/EventCommand.java @@ -64,10 +64,9 @@ public class EventCommand extends SWCommand { if(now.isBefore(e.getDeadline().toInstant())) { Message.send("EVENT_COMING_DEADLINE", player, e.getDeadline()); } - String schemType = e.getSchemType(); + SchematicType schemType = e.getSchematicType(); if (schemType != null) { - SchematicType schematicType = SchematicType.fromDB(schemType); - if (schematicType != null && schematicType.getDeadline() != null && now.isBefore(schematicType.getDeadline().toInstant())) { + if (schemType.getDeadline() != null && now.isBefore(schemType.getDeadline().toInstant())) { Message.send("EVENT_COMING_SCHEM_DEADLINE", player, e.getDeadline()); } } diff --git a/src/de/steamwar/bungeecore/commands/TutorialCommand.java b/src/de/steamwar/bungeecore/commands/TutorialCommand.java index 57dec80..9fdc967 100644 --- a/src/de/steamwar/bungeecore/commands/TutorialCommand.java +++ b/src/de/steamwar/bungeecore/commands/TutorialCommand.java @@ -165,6 +165,6 @@ public class TutorialCommand extends SWCommand { } private File world(Tutorial tutorial) { - return new File(ServerStarter.TUTORIAL_PATH, String.valueOf(tutorial.getId())); + return new File(ServerStarter.TUTORIAL_PATH, String.valueOf(tutorial.getTutorialId())); } }