suppress or remove most warnings

This commit is contained in:
alexcrea 2026-08-16 10:51:05 +02:00
parent 6ea8430247
commit fc4df29033
Signed by: alexcrea
GPG key ID: E59DF23EE2A2266C
6 changed files with 30 additions and 14 deletions

View file

@ -1,5 +1,4 @@
@file:Suppress("DEPRECATION", "removal")
package xyz.alexcrea.cuanvil.dependency.datapack
import io.papermc.paper.datapack.Datapack
@ -26,7 +25,7 @@ object DataPackTester {
} catch(_: NoSuchMethodException) {
try {
DataPack::class.java.getDeclaredMethod("getKey")
} catch(e: NoSuchMethodException) {
} catch(_: NoSuchMethodException) {
System.err.println("Could not find compatible datapack manager")
System.err.println("If you are using a datapack that should be compatible with CustomAnvil. It will not get detected...")
return emptyList()

View file

@ -13,6 +13,7 @@ object AnvilTitleUtil {
private val runTaskMap = HashMap<UUID, ScheduledTask>()
@Suppress("DEPRECATION")
private fun actualRename(view: AnvilView, name: String, player: HumanEntity, anvilDialog: AnvilRenameDialog) {
runTaskMap.remove(player.uniqueId)
if (view.title == name) return