Fix format parsing in /unlimited

This commit is contained in:
Josh Roy 2024-02-11 20:52:00 -05:00
parent 0cd47639c2
commit ac0ba8890f

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import com.earth2me.essentials.User;
import com.earth2me.essentials.craftbukkit.Inventories;
import com.earth2me.essentials.utils.AdventureUtil;
import net.ess3.api.TranslatableException;
import org.bukkit.Material;
import org.bukkit.Server;
@ -29,7 +30,7 @@ public class Commandunlimited extends EssentialsCommand {
}
if (args[0].equalsIgnoreCase("list")) {
user.sendMessage(getList(user, target));
user.sendComponent(AdventureUtil.miniMessage().deserialize(getList(user, target)));
} else if (args[0].equalsIgnoreCase("clear")) {
for (final Material m : new HashSet<>(target.getUnlimited())) {
if (m == null) {
@ -56,7 +57,7 @@ public class Commandunlimited extends EssentialsCommand {
}
joiner.add(material.toString().toLowerCase(Locale.ENGLISH).replace("_", ""));
}
output.append(joiner.toString());
output.append(joiner);
return output.toString();
}