mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Fix for #915
setCustomName removes unnecesary ChatColor codes (e.g. &r that doesn't reset anything). Saving the true CustomName in BlockStorage resolves the issue.
This commit is contained in:
parent
6df3f8dfe1
commit
d9015cbbf3
@ -20,7 +20,7 @@ import me.mrCookieSlime.Slimefun.api.BlockStorage;
|
||||
public class Projector {
|
||||
|
||||
public static ArmorStand getArmorStand(Block projector) {
|
||||
String nametag = ChatColor.translateAlternateColorCodes('&', BlockStorage.getLocationInfo(projector.getLocation(), "text"));
|
||||
String nametag = BlockStorage.getLocationInfo(projector.getLocation(), "text");
|
||||
double offset = Double.valueOf(BlockStorage.getLocationInfo(projector.getLocation(), "offset"));
|
||||
Location l = new Location(projector.getWorld(), projector.getX() + 0.5, projector.getY() + offset, projector.getZ() + 0.5);
|
||||
|
||||
@ -45,7 +45,7 @@ public class Projector {
|
||||
MenuHelper.awaitChatInput(pl, (player, message) -> {
|
||||
ArmorStand hologram = getArmorStand(projector);
|
||||
hologram.setCustomName(ChatColor.translateAlternateColorCodes('&', message));
|
||||
BlockStorage.addBlockInfo(projector, "text", message);
|
||||
BlockStorage.addBlockInfo(projector, "text", hologram.getCustomName());
|
||||
openEditor(player, projector);
|
||||
return false;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user