Skip to content

Generated Chat response-listener priority is invalid #83

Description

@CyR1en

Affected version

CommandPrompterPaper 3.1.1 and the current development branch (5534104).

Description

Freshly generated prompt-config.yml uses DEFAULT for TextPrompt.Response-Listener-Priority, but Bukkit has no EventPriority.DEFAULT value.

Steps to reproduce

  1. Generate a fresh prompt-config.yml.
  2. Leave Response-Listener-Priority: DEFAULT unchanged.
  3. Start the plugin with debug logging or inspect the registered fallback Chat listener priority.

Expected behavior

The generated default is a valid Bukkit priority and is registered as documented.

Actual behavior

EventPriority.valueOf("DEFAULT") fails and ChatPromptListener silently falls back to LOWEST.

Technical cause

PromptConfig both emits and lists DEFAULT as valid (PromptConfig.java:330-337), while ChatPromptListener.java:57-63 parses Bukkit's enum and catches the invalid value.

Suggested direction

Use a real default such as NORMAL or LOWEST, remove DEFAULT from the generated valid-values comment, and migrate or warn on existing invalid values.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions