aboutsummaryrefslogtreecommitdiffstats
path: root/common/src
diff options
context:
space:
mode:
authorKrakenied <Krakenied1@gmail.com>2024-05-30 08:44:41 +0200
committerLeonardo Bishop <13875753+LMBishop@users.noreply.github.com>2024-06-03 18:48:22 +0100
commit5c62483c10291cb874149bc23c0418978720655a (patch)
treedba81e942697dc39a8be9d68724c8bf990338f0d /common/src
parent40394f82c0ae003d6c54cf435e3c6f0c519d5069 (diff)
Extract method getting registration message
Diffstat (limited to 'common/src')
-rw-r--r--common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskTypeManager.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskTypeManager.java b/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskTypeManager.java
index 84cf5367..d5ee9687 100644
--- a/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskTypeManager.java
+++ b/common/src/main/java/com/leonardobishop/quests/common/tasktype/TaskTypeManager.java
@@ -25,6 +25,7 @@ public abstract class TaskTypeManager {
private final Map<String, TaskType> taskTypes = new HashMap<>();
private final Map<String, String> aliases = new HashMap<>();
private final Set<String> exclusions;
+ private int registered;
private int skipped;
private int unsupported;
private boolean registrationsOpen;
@@ -102,6 +103,7 @@ public abstract class TaskTypeManager {
this.aliases.put(alias, type);
}
+ this.registered++;
return true;
}
@@ -196,6 +198,15 @@ public abstract class TaskTypeManager {
}
/**
+ * Returns the number of task types registered.
+ *
+ * @return number of task types registered
+ */
+ public int getRegistered() {
+ return this.registered;
+ }
+
+ /**
* Returns the number of task types skipped due to exclusions or name conflicts.
*
* @return number of task types skipped