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 net.kyori.adventure.text.Component;
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.World;
import org.bukkit.command.Command;
@ -189,7 +189,7 @@ public class WorldListener extends PlexListener
String noEdit = plugin.config.getString("worlds." + world.getName().toLowerCase() + ".noEdit");
if (noEdit != null)
{
player.sendMessage(LegacyComponentSerializer.legacyAmpersand().deserialize(noEdit));
player.sendMessage(MiniMessage.miniMessage().deserialize(noEdit));
}
}
return false;

View File

@ -170,7 +170,7 @@ worlds:
flatlands:
name: "Flatlands"
permission: "plex.world.flatlands"
noEdit: "&cYou can't edit this world!"
noEdit: "<red>You can't edit this world!"
gameRules:
# The gamerules here override the global gamerules
- "doWeatherCycle;false"
@ -185,7 +185,7 @@ worlds:
permission: "plex.world.adminworld"
requiredLevels:
- "Rank.ADMIN" # Minimum rank requirement
noEdit: "&cYou can't edit this world!"
noEdit: "<red>You can't edit this world!"
gameRules:
- "doWeatherCycle;false"
- "doDaylightCycle;false"
@ -199,7 +199,7 @@ worlds:
permission: "plex.world.masterbuilderworld"
requiredLevels:
- "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:
- "doWeatherCycle;false"
- "doDaylightCycle;false"