Address deprecated 'Times#of()' in 'PlotPlayer' (#4207)

This commit is contained in:
Alexander Brandes 2023-10-15 14:05:04 +02:00 committed by GitHub
parent b00a46b286
commit c013b92e62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View File

@ -72,8 +72,6 @@ tasks {
opt.links("https://jd.advntr.dev/text-minimessage/4.14.0/") opt.links("https://jd.advntr.dev/text-minimessage/4.14.0/")
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/") opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
opt.links("https://checkerframework.org/api/") opt.links("https://checkerframework.org/api/")
opt.links("https://javadocs.dev/com.intellectualsites.informative-annotations/informative-annotations/"
+ libs.informativeAnnotations.get().versionConstraint.toString())
opt.isLinkSource = true opt.isLinkSource = true
opt.bottom(File("$rootDir/javadocfooter.html").readText()) opt.bottom(File("$rootDir/javadocfooter.html").readText())
opt.isUse = true opt.isUse = true

View File

@ -882,7 +882,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
final Component titleComponent = MiniMessage.miniMessage().deserialize(title.getComponent(this), replacements); final Component titleComponent = MiniMessage.miniMessage().deserialize(title.getComponent(this), replacements);
final Component subtitleComponent = final Component subtitleComponent =
MiniMessage.miniMessage().deserialize(subtitle.getComponent(this), replacements); MiniMessage.miniMessage().deserialize(subtitle.getComponent(this), replacements);
final Title.Times times = Title.Times.of( final Title.Times times = Title.Times.times(
Duration.of(Settings.Titles.TITLES_FADE_IN * 50L, ChronoUnit.MILLIS), Duration.of(Settings.Titles.TITLES_FADE_IN * 50L, ChronoUnit.MILLIS),
Duration.of(Settings.Titles.TITLES_STAY * 50L, ChronoUnit.MILLIS), Duration.of(Settings.Titles.TITLES_STAY * 50L, ChronoUnit.MILLIS),
Duration.of(Settings.Titles.TITLES_FADE_OUT * 50L, ChronoUnit.MILLIS) Duration.of(Settings.Titles.TITLES_FADE_OUT * 50L, ChronoUnit.MILLIS)