Insprill / custom-join-messages

Feature-packed plugin for handling all join and quit notifications on Spigot/Paper servers
https://modrinth.com/plugin/custom-join-messages/
GNU General Public License v3.0
10 stars 0 forks source link

Choosing MineDown as formatter in settings causes plugin failure #49

Closed Metamogul closed 1 year ago

Metamogul commented 1 year ago

Server Version

Paper 1.20.2 git-Paper-246

CJM Version

17.3.1

Describe the Bug

When setting MineDown as formatter in the settings, the plugin cannot be loaded. The server log will contain the error:

Error occurred while enabling CustomJoinMessages v17.3.1 (Is it up to date?)
java.lang.IllegalArgumentException: No enum constant net.insprill.cjm.formatting.FormatterType.MineDown

Expected Behavior

The plugin loads as expected and uses MineDown as formatter.

Steps to Reproduce

Use the following config:

#          Custom Join Messages          #
#              by Insprill               #
#                                        #
##########################################
# Please visit https://cjm.insprill.net/ for the full CJM wiki.

# What language plugin messages should be sent in. Check the wiki for all supported languages.
language: en

# Settings for hooks into other plugins. These settings only apply after a restart.
Addons: 
  # Settings for Auth plugins like AuthMe.
   Auth: 
      Wait-For-Login: true

  # Settings for Vanish plugin hooks.
   Vanish: 
      Fake-Messages: 
         Enabled: true

  # Settings for Jail plugins
   Jail: 
      Ignore-Jailed-Players: false

# Settings for formatting text.
formatting: 
  # Which formatter should be used to format text. You can choose from the following:
  # - MINEDOWN
  # - MINIMESSAGE
  # - LEGACY
  # For more information on formatting and what each option does, check out the wiki (https://cjm.insprill.net/en/latest/writing-messages/formatting.html).
   formatter: MineDown

# If true, messages will be sent when players change worlds instead
# of only when they join the server. This also only sends messages to players who are in the same world.
# The Overworld, Nether, and End all count as the same world.
World-Based-Messages: 
  # Whether the update checker is enabled.
   Enabled: false
  # Messages will only be sent when moving between worlds in different groups.
  # Those groups can be defined here.
  # The keys don't matter as long as there's no duplicates.
  # Note that groups are saved by key name, so while what it is doesn't matter,
  # it cannot be changed without losing its reference.
  # All world names are cAsE-SeNsItIvE.
   Groups: 
      1: 
      - world
      - world_nether
      - world_the_end
  # How worlds which aren't in a group should be handled.
  # You can pick from one of 3 options:
  #  NONE - Worlds will not send messages when entering/exiting.
  #  SAME - Worlds will be treated as if they're in one group.
  #  INDIVIDUAL - Worlds will be treated as if they're all in their own groups.
   Ungrouped-Mode: INDIVIDUAL

# Settings for the plugins update checker.
Update-Checker: 
   Enabled: true
  # The date format used when displaying the release date of a new version.
   Date-Format: MM-dd-yyyy HH:mm
  # Settings for notifications when an update is found.
   Notifications: 
      In-Game: true
      Console: true

# DO NOT TOUCH!!!
version: 3.0.0

Server Logs

https://mclo.gs/RC6OSGq

Additional Information

No response

Checklist

Insprill commented 1 year ago

The name is case-sensitive, it must exactly match the values in the comment. I'll make it case-insensitive for the next update.

Insprill commented 1 year ago

Making this case-insensitive would require work in the config parsing library I'm using, which I don't have time to do. However, I've added a note in the comments about it.