Switch legacy to MiniMessage

This commit is contained in:
Telesphoreo 2022-06-04 21:31:36 -05:00
parent 1ae8e779b1
commit dc4ac39fe4
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.command.Command; import org.bukkit.command.Command;
@ -189,7 +189,7 @@ public class WorldListener extends PlexListener
String noEdit = plugin.config.getString("worlds." + world.getName().toLowerCase() + ".noEdit"); String noEdit = plugin.config.getString("worlds." + world.getName().toLowerCase() + ".noEdit");
if (noEdit != null) if (noEdit != null)
{ {
player.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(noEdit)); player.sendMessage(MiniMessage.miniMessage().deserialize(noEdit));
} }
} }
return false; return false;

View File

@ -170,7 +170,7 @@ worlds:
flatlands: flatlands:
name: "Flatlands" name: "Flatlands"
permission: "plex.world.flatlands" permission: "plex.world.flatlands"
noEdit: "&cYou can't edit this world!" noEdit: "<red>You can't edit this world!"
gameRules: gameRules:
# The gamerules here override the global gamerules # The gamerules here override the global gamerules
- "doWeatherCycle;false" - "doWeatherCycle;false"
@ -185,7 +185,7 @@ worlds:
permission: "plex.world.adminworld" permission: "plex.world.adminworld"
requiredLevels: requiredLevels:
- "Rank.ADMIN" # Minimum rank requirement - "Rank.ADMIN" # Minimum rank requirement
noEdit: "&cYou can't edit this world!" noEdit: "<red>You can't edit this world!"
gameRules: gameRules:
- "doWeatherCycle;false" - "doWeatherCycle;false"
- "doDaylightCycle;false" - "doDaylightCycle;false"
@ -199,7 +199,7 @@ worlds:
permission: "plex.world.masterbuilderworld" permission: "plex.world.masterbuilderworld"
requiredLevels: requiredLevels:
- "Title.MASTER_BUILDER" # Title has no "minimum", so this will have to be their title - "Title.MASTER_BUILDER" # Title has no "minimum", so this will have to be their title
noEdit: "&cYou can't edit this world!" noEdit: "<red>You can't edit this world!"
gameRules: gameRules:
- "doWeatherCycle;false" - "doWeatherCycle;false"
- "doDaylightCycle;false" - "doDaylightCycle;false"