============================================================
DiscordBridgeJP 1.0.0 -> 1.1.3 Update Guide
============================================================

This file explains what to add or move in your existing config files
when updating from 1.0.0 to 1.1.3.

Use it together with these bundled reference files:
  - update-config.yml.txt    (complete config.yml sample)
  - update-bot.yml.txt       (complete bot.yml sample, new file)
  - update-messages.yml.txt  (complete messages.yml sample)

Please back up your entire plugins/DiscordBridgeJP/ folder before starting.


------------------------------------------------------------
Step 1: Replace the jar
------------------------------------------------------------
Delete the old DiscordBridgeJP-x.x.x.jar from your plugins folder and
place DiscordBridgeJP-ver1.1.3.jar there instead.
Do not start the server yet - finish steps 2-4 first.


------------------------------------------------------------
Step 2: Create bot.yml (most important step)
------------------------------------------------------------
In 1.0.0, bot-token and all channel IDs lived inside config.yml. In 1.1.3
they have been moved to a separate file, bot.yml, to reduce the risk of
accidentally leaking them.

Items to MOVE from your current config.yml into bot.yml:
  bot-token
  guild-id
  chat-channel-id
  console-channel-id
  verify-channel-id
  command-log-channel-id  (add it if you don't already have it, see Step 3)

Steps:
  1. If bot.yml doesn't exist yet in plugins/DiscordBridgeJP/, either start
     the server once to auto-generate it, or save update-bot.yml.txt as
     bot.yml.
  2. Copy the values of bot-token, guild-id, and each channel ID from your
     current config.yml into the matching fields in the new bot.yml.
  3. Once moved, you can delete those lines from config.yml (leaving them
     there is harmless, they're just no longer read).


------------------------------------------------------------
Step 3: Add to config.yml
------------------------------------------------------------
The following blocks are new in 1.1.3 and don't exist in your old
config.yml. Refer to update-config.yml.txt and add the matching sections.

[Entirely new blocks to add]

  - guild-leave: (the whole block)
    (Discord-leave detection settings: enabled / rejoin-verify /
     login-check-enabled / login-check-exempt-groups)

  - timeout-command: (the whole block)
    (tab-complete settings for the timeout/removetimeout commands)

[Add these fields inside an existing block]

  - Inside maintenance:, add these 5 fields:
      notify-join-leave
      notify-first-join
      notify-advancement
      notify-death
      notify-server
      chat-enabled
    (keep your existing bypass-permission and reason values as-is)

  - command-log-channel-id
    (if you already had this in 1.0.0, move it into bot.yml; if not, add
     it to bot.yml as new. Default is "0" = disabled)

[Value unchanged, but its meaning has changed]

  - require-link-for-new-players
    The value (true/false) doesn't need to change, but what happens when
    it's true is different now. In 1.1.3, unlinking itself is now treated
    as a blockable action too. See the comments in update-config.yml.txt
    for details.


------------------------------------------------------------
Step 4: Check messages.yml
------------------------------------------------------------
The structure of messages.yml (notifications / maintenance / server, etc.)
has not changed since 1.0.0. Your existing messages.yml should work as-is.

Only compare it with update-messages.yml.txt if you want to double-check.


------------------------------------------------------------
Step 5: Start and verify
------------------------------------------------------------
1. Once bot.yml and config.yml are edited, start the server.
2. Check the console for any errors.
3. Run /discordbridgejp status in-game to confirm the Bot is connected.
4. If everything looks fine, you're done.


------------------------------------------------------------
About the new permission nodes (optional)
------------------------------------------------------------
1.1.3 adds a per-command permission node (e.g. discordbridgejp.command.reload)
for each admin command, which used to be bundled entirely under
discordbridgejp.admin. Players with discordbridgejp.admin still get access
to everything as before, so this change is optional to act on. Only grant
the individual nodes via LuckPerms if you want to create a moderator who
can use just one specific command. See the Modrinth page or GitHub Wiki
for details.


------------------------------------------------------------
Still having trouble?
------------------------------------------------------------
Please report it via GitHub Issues. Including debug logs
(set debug: true in config.yml) helps speed up the response.


------------------------------------------------------------
Why isn't this applied automatically?
------------------------------------------------------------
An earlier version of this plugin used to auto-append new config keys on
startup. That feature was removed after feedback that having values
rewritten automatically felt risky, and that it was hard to notice which
new options had quietly appeared. Since 1.1.3, new config options are
instead documented in guides like this one, and applying them is left up
to you. Sorry for the extra step, and thank you for understanding.


------------------------------------------------------------
This file and the related files are safe to delete
------------------------------------------------------------
This file (update-guide-en.txt), along with the bundled
update-config.yml.txt, update-bot.yml.txt, update-messages.yml.txt, and
update-guide.txt, are only reference material for this update.

Once you've updated your config files following the steps above and
confirmed the server starts and works correctly, you can safely delete
these files from plugins/DiscordBridgeJP/ (removing them has no effect
on how the plugin runs).

