Skip to content

Commit

Permalink
fix replace #
Browse files Browse the repository at this point in the history
  • Loading branch information
xhyrom committed Dec 31, 2023
1 parent c55af89 commit 3f121f2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,15 @@ class GenerationContext(
*/
fun getFriendlyDstName(elem: MappingTreeView.ElementMappingView): String {
fun getName(elem: MappingTreeView.ElementMappingView, ns: String): String? {
val name = elem.getName(ns) ?: return null
var name = elem.getName(ns) ?: return null

if (elem is MappingTreeView.ClassMappingView && ns in versionReplaceCandidates) {
return name.replaceCraftBukkitNMSVersion(elem.tree.craftBukkitNmsVersion)
name = name.replaceCraftBukkitNMSVersion(elem.tree.craftBukkitNmsVersion)
name = name.replace("#", "")
return name;
}

name = name.replace("#", "")
return name
}

Expand Down

0 comments on commit 3f121f2

Please sign in to comment.