33 lines
975 B
Java
33 lines
975 B
Java
package me.unurled.sacredrealms.sr.utils;
|
|
|
|
import static me.unurled.srcore.utils.Component.textComp;
|
|
|
|
import java.time.Duration;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import net.kyori.adventure.key.Key;
|
|
import net.kyori.adventure.title.Title;
|
|
import net.kyori.adventure.title.Title.Times;
|
|
import org.bukkit.Location;
|
|
import org.bukkit.entity.Player;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public class CutsceneUtil {
|
|
|
|
private static final String FONT = "custom";
|
|
|
|
private CutsceneUtil() {}
|
|
|
|
public static void showBlackScreen(@NotNull Player p, int duration, int fadeIn, int fadeOut) {
|
|
// /title @s title {"text":"\uE000","color":"black"}
|
|
Title title =
|
|
Title.title(
|
|
textComp("\uE000").font(Key.key(FONT)),
|
|
textComp(""),
|
|
Times.times(
|
|
Duration.ofSeconds(fadeIn),
|
|
Duration.ofSeconds(duration),
|
|
Duration.ofSeconds(fadeOut)));
|
|
p.showTitle(title);
|
|
}
|
|
}
|