mirror of
https://github.com/RDCN-Community-Developers/rdkt.git
synced 2026-09-04 17:25:33 +08:00
Added RDDeprecated.
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
package cn.rdlevel.rdkt.core.annotations
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This annotation marks APIs that are not recommended for use in levels, either because they are broken, or there are better alternatives available. Use with caution.
|
||||||
|
*/
|
||||||
|
@MustBeDocumented
|
||||||
|
@Target(
|
||||||
|
AnnotationTarget.CLASS,
|
||||||
|
AnnotationTarget.FUNCTION,
|
||||||
|
AnnotationTarget.PROPERTY,
|
||||||
|
AnnotationTarget.TYPEALIAS,
|
||||||
|
AnnotationTarget.CONSTRUCTOR,
|
||||||
|
)
|
||||||
|
@Retention(AnnotationRetention.BINARY)
|
||||||
|
@RequiresOptIn(
|
||||||
|
"This API is not recommended for use in levels, either because it is broken, or there are better alternatives available. Use with caution.",
|
||||||
|
RequiresOptIn.Level.WARNING,
|
||||||
|
)
|
||||||
|
public annotation class RDDeprecated
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.rdlevel.rdkt.core.settings
|
package cn.rdlevel.rdkt.core.settings
|
||||||
|
|
||||||
|
import cn.rdlevel.rdkt.core.annotations.RDDeprecated
|
||||||
import cn.rdlevel.rdkt.core.settings.CustomClasses.INJURY
|
import cn.rdlevel.rdkt.core.settings.CustomClasses.INJURY
|
||||||
|
|
||||||
|
|
||||||
@@ -56,6 +57,6 @@ public object CustomClasses {
|
|||||||
* Replaces hearts with pumpkins.
|
* Replaces hearts with pumpkins.
|
||||||
* Currently, this is broken and does not work.
|
* Currently, this is broken and does not work.
|
||||||
*/
|
*/
|
||||||
@Deprecated("This custom class is currently broken and does not work.")
|
@RDDeprecated
|
||||||
public const val HALLOWEEN: String = "Halloween"
|
public const val HALLOWEEN: String = "Halloween"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user