diff options
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/util')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt b/src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt new file mode 100644 index 0000000..7a98f7f --- /dev/null +++ b/src/main/kotlin/com/dulkirfabric/util/ItemChangeHandler.kt @@ -0,0 +1,13 @@ +package com.dulkirfabric.util + +import com.dulkirfabric.events.TooltipRenderChangeEvent + +object ItemChangeHandler { + var prevName = "" + fun handle(name: String) { + if (name != prevName) { + prevName = name + TooltipRenderChangeEvent.post() + } + } +}
\ No newline at end of file |