mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fix mistake caused by string being imutable.
This commit is contained in:
parent
9744817c04
commit
b6853a6889
1 changed files with 2 additions and 2 deletions
|
|
@ -163,10 +163,10 @@ class AnvilEventListener(private val packetManager: PacketManager) : Listener {
|
|||
// Rename item and add renaming cost
|
||||
resultItem.itemMeta?.let {
|
||||
val displayName = ChatColor.stripColor(it.displayName)
|
||||
val inventoryName = ChatColor.stripColor(inventory.renameText)
|
||||
var inventoryName = ChatColor.stripColor(inventory.renameText)
|
||||
// Change color name
|
||||
if(inventoryName != null){
|
||||
inventoryName.replace("&", "§")
|
||||
inventoryName = inventoryName.replace("&", "§")
|
||||
}
|
||||
|
||||
if (!displayName.contentEquals(inventoryName)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue