Skip to content

Commit

Permalink
impl settings for queue ids
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 11, 2022
1 parent c8c56fa commit 781e989
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Expand Up @@ -651,7 +651,7 @@ public static void registerTags() {
// @returns ListTag
// @description
// Returns a list of the last 10 things the player has said, less if the player hasn't said all that much.
// Works with offline players, if the player previously joke and typed in chat since the last server restart.
// Works with offline players, if the player previously joined and typed in chat since the last server restart.
// -->
tagProcessor.registerTag(ListTag.class, "chat_history_list", (attribute, object) -> {
List<String> history = PlayerTagBase.playerChatHistory.get(object.getUUID());
Expand Down
Expand Up @@ -43,6 +43,9 @@ public static void refillCache() {
CoreConfiguration.allowFileWrite = config.getBoolean("Commands.File.Allow write", false);
CoreConfiguration.filePathLimit = config.getString("Commands.File.Restrict path", "data/");
CoreConfiguration.verifyThreadMatches = config.getBoolean("Debug.Verify thread", false);
CoreConfiguration.queueIdPrefix = config.getBoolean("Queues.Id parts.Prefix", true);
CoreConfiguration.queueIdNumeric = config.getBoolean("Queues.Id parts.Numeric", true);
CoreConfiguration.queueIdWords = config.getBoolean("Queues.Id parts.Words", true);
String scriptEncoding = config.getString("Scripts.Encoding", "default");
if (scriptEncoding.equalsIgnoreCase("default")) {
CoreConfiguration.scriptEncoding = null;
Expand Down
14 changes: 13 additions & 1 deletion plugin/src/main/resources/config.yml
Expand Up @@ -66,8 +66,20 @@ Scripts:
# This defaults to false to avoid any possible interference on servers that don't use command scripts.
Auto init: false

# The default options for new Denizen NPCs
# Settings related to queues.
Queues:
# Toggle which parts of a queue ID are used for the queue ID generator.
# At least one (or both) of "numeric" or "words" must be enabled (otherwise, queue IDs cannot be unique).
Id parts:
# Whether to include the queue prefix - usually the script name.
Prefix: true
# Whether to include the numeric ID - incremental number, guaranteed unique.
# Be warned that disabling this reduces the guarantee of unique IDs.
Numeric: true
# Whether to include random words - helps easily distinguish queues in logs. Can create partial uniqueness if numeric is turned off.
Words: true

# The default options for new Denizen NPCs
# Whether to spawn NPCs with given traits, and what settings to have by default
Traits:
Health:
Expand Down

0 comments on commit 781e989

Please sign in to comment.