summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrakenied <Krakenied1@gmail.com>2024-05-31 13:41:49 +0200
committerLeonardo Bishop <13875753+LMBishop@users.noreply.github.com>2024-06-03 18:48:22 +0100
commit8338339b371770237d80b8397d8b0e2d00ab3c79 (patch)
tree7cad96afac553f54cb1a477b443fee8d5c031eb8
parent011fa31ef4a2f577bbe233959fc9cb255f549ce4 (diff)
Add removed constructor back
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java4
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/BukkitTaskType.java4
-rw-r--r--common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskType.java11
3 files changed, 17 insertions, 2 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java
index b2ad9570..65e9cd07 100644
--- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java
+++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/BukkitQuestsPlugin.java
@@ -523,8 +523,8 @@ public class BukkitQuestsPlugin extends JavaPlugin implements Quests {
private @NotNull String getRegistrationMessage() {
final int registered = this.taskTypeManager.getRegistered();
- final int skipped = taskTypeManager.getSkipped();
- final int unsupported = taskTypeManager.getUnsupported();
+ final int skipped = this.taskTypeManager.getSkipped();
+ final int unsupported = this.taskTypeManager.getUnsupported();
final StringBuilder sb = new StringBuilder();
sb.append(registered).append(" task types have been registered");
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/BukkitTaskType.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/BukkitTaskType.java
index aa2d751e..792792db 100644
--- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/BukkitTaskType.java
+++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/BukkitTaskType.java
@@ -15,6 +15,10 @@ public abstract class BukkitTaskType extends TaskType implements Listener {
super(type, author, description, aliases);
}
+ public BukkitTaskType(final @NotNull String type, final @Nullable String author, final @Nullable String description) {
+ super(type, author, description);
+ }
+
public BukkitTaskType(final @NotNull String type) {
super(type);
}
diff --git a/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskType.java b/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskType.java
index 15946c92..b05e5ab8 100644
--- a/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskType.java
+++ b/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskType.java
@@ -49,6 +49,17 @@ public abstract class TaskType {
}
/**
+ * Constructs a TaskType with the specified type, author, and description.
+ *
+ * @param type the name of the task type, should not contain spaces
+ * @param author the name of the person (or people) who wrote it
+ * @param description a short, simple description of the task type
+ */
+ public TaskType(final @NotNull String type, final @Nullable String author, final @Nullable String description) {
+ this(type, author, description, new String[0]);
+ }
+
+ /**
* Constructs a TaskType with the specified type.
*
* @param type the name of the task type, should not contain spaces