9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-24 00:59:18 +00:00

fix: Remove legacy MineDown calls

This commit is contained in:
William
2024-04-07 12:47:08 +01:00
parent 5456b232f0
commit 8463e1bb7a
2 changed files with 4 additions and 9 deletions

View File

@@ -378,12 +378,12 @@ public interface HuskSync extends Task.Supplier, EventDispatcher, ConfigProvider
private static final String FORMAT = """
HuskSync has failed to load! The plugin will not be enabled and no data will be synchronized.
Please make sure the plugin has been setup correctly (https://william278.net/docs/husksync/setup):
1) Make sure you've entered your MySQL, MariaDB or MongoDB database details correctly in config.yml
2) Make sure your Redis server details are also correct in config.yml
3) Make sure your config is up-to-date (https://william278.net/docs/husksync/config-file)
4) Check the error below for more details
Caused by: %s""";
FailedToLoadException(@NotNull String message, @NotNull Throwable cause) {

View File

@@ -20,7 +20,6 @@
package net.william278.husksync.user;
import de.themoep.minedown.adventure.MineDown;
import de.themoep.minedown.adventure.MineDownParser;
import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.text.Component;
import net.william278.husksync.HuskSync;
@@ -71,9 +70,7 @@ public abstract class OnlineUser extends User implements CommandUser, UserDataHo
* @param mineDown the parsed {@link MineDown} to send
*/
public void sendMessage(@NotNull MineDown mineDown) {
sendMessage(mineDown
.disable(MineDownParser.Option.SIMPLE_FORMATTING)
.replace().toComponent());
sendMessage(mineDown.toComponent());
}
/**
@@ -82,9 +79,7 @@ public abstract class OnlineUser extends User implements CommandUser, UserDataHo
* @param mineDown the parsed {@link MineDown} to send
*/
public void sendActionBar(@NotNull MineDown mineDown) {
getAudience().sendActionBar(mineDown
.disable(MineDownParser.Option.SIMPLE_FORMATTING)
.replace().toComponent());
getAudience().sendActionBar(mineDown.toComponent());
}
/**