feat: add TabList Header and Footer
This commit is contained in:
parent
764e0ac5ba
commit
c4f7aecfa6
2 changed files with 7 additions and 51 deletions
|
@ -17,20 +17,14 @@ public class GameTimeManager {
|
||||||
private final Varo plugin;
|
private final Varo plugin;
|
||||||
private static final int firstPlayTimeMinutes = 50;
|
private static final int firstPlayTimeMinutes = 50;
|
||||||
private static final int firstPlayTimeLoginMinutes = 10;
|
private static final int firstPlayTimeLoginMinutes = 10;
|
||||||
// private static final int firstPlayTimeMinutes = 360;
|
private static final int protectionPeriodMinutes = 11;
|
||||||
// private static final int protectionPeriodMinutes = 11;
|
|
||||||
private static final int protectionPeriodMinutes = 4;
|
|
||||||
// private static final LocalTime firstPlayStart = LocalTime.of(19, 20, 00);
|
// private static final LocalTime firstPlayStart = LocalTime.of(19, 20, 00);
|
||||||
private static final LocalTime firstPlayStart = LocalTime.now().plusMinutes(1);
|
private static final LocalTime firstPlayStart = LocalTime.now().plusMinutes(1);
|
||||||
private static final int firstRoundPreStartMinutes = 1;
|
private static final int firstRoundPreStartMinutes = 1;
|
||||||
// private static final int playTimeMinutes = 30;
|
private static final int playTimeMinutes = 30;
|
||||||
// private static final int playTimeLoginMinutes = 5;
|
private static final int playTimeLoginMinutes = 5;
|
||||||
private static final int playTimeMinutes = 1;
|
|
||||||
private static final int playTimeLoginMinutes = 1;
|
|
||||||
// private static final LocalTime playStart = LocalTime.of(19, 30, 00);
|
// private static final LocalTime playStart = LocalTime.of(19, 30, 00);
|
||||||
// private static final LocalTime playStart = LocalTime.now().plusMinutes(30);
|
|
||||||
private static final LocalTime playStart = LocalTime.now().plusSeconds(10);
|
private static final LocalTime playStart = LocalTime.now().plusSeconds(10);
|
||||||
// private static final LocalTime playStart = LocalTime.now();
|
|
||||||
|
|
||||||
public GameTimeManager(final Varo plugin) {
|
public GameTimeManager(final Varo plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
|
@ -67,48 +61,6 @@ public class GameTimeManager {
|
||||||
return (int) currentTime.until(start, ChronoUnit.SECONDS);
|
return (int) currentTime.until(start, ChronoUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Rewrite
|
|
||||||
// private void startPlayTimeTimer() {
|
|
||||||
// new BukkitRunnable() {
|
|
||||||
// boolean broadcast1 = false;
|
|
||||||
// boolean broadcast2 = false;
|
|
||||||
|
|
||||||
// @Override
|
|
||||||
// public void run() {
|
|
||||||
// if (currentDay() == 1) {
|
|
||||||
// for (final Player p : Bukkit.getOnlinePlayers()) {
|
|
||||||
// if (getGameTimeLeft() < 50 && getGameTimeLeft() > 45) {
|
|
||||||
// if (!p.getLocation().getWorld().getEnvironment().equals(Environment.THE_END)) {
|
|
||||||
// p.setGameMode(GameMode.ADVENTURE);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (getGameTimeLeft() == 45) {
|
|
||||||
// if (!p.getLocation().getWorld().getEnvironment().equals(Environment.THE_END)) {
|
|
||||||
// p.setGameMode(GameMode.SURVIVAL);
|
|
||||||
// }
|
|
||||||
// if (!broadcast1) {
|
|
||||||
// Bukkit.broadcastMessage("§aEs geht Los!");
|
|
||||||
// Bukkit.broadcastMessage("Genießt die 10 minütige Schutzzeit.");
|
|
||||||
// }
|
|
||||||
// broadcast1 = true;
|
|
||||||
// }
|
|
||||||
// if (getGameTimeLeft() == 35) {
|
|
||||||
// if (!broadcast2) {
|
|
||||||
// Bukkit.broadcastMessage("Die Schutzzeit ist nur vorbei.");
|
|
||||||
// }
|
|
||||||
// broadcast2 = true;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (isPlayTimeOver()) {
|
|
||||||
// for (final Player p : Bukkit.getOnlinePlayers()) {
|
|
||||||
// p.kickPlayer(plugin.getLangUtils().get("Service.KickPlayTimeOver"));
|
|
||||||
// }
|
|
||||||
// this.cancel();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }.runTaskTimer(this.plugin, 20l, 20l);
|
|
||||||
// }
|
|
||||||
private void startPlayTimeTimer() {
|
private void startPlayTimeTimer() {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -44,6 +44,10 @@ public class PlayerUtils {
|
||||||
p.removePotionEffect(PotionEffectType.BLINDNESS);
|
p.removePotionEffect(PotionEffectType.BLINDNESS);
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, seconds * 20, 1, false, false));
|
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, seconds * 20, 1, false, false));
|
||||||
|
|
||||||
|
p.setPlayerListHeaderFooter("§b------------------------------\n"
|
||||||
|
+ this.plugin.getLangUtils().get("Service.LoadingTitle") + "\n§b------------------------------\n§r ",
|
||||||
|
"§7§o\npowered by Cliffbreak.de");
|
||||||
|
|
||||||
final BukkitTask hidePlayersTask = new BukkitRunnable() {
|
final BukkitTask hidePlayersTask = new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
Loading…
Reference in a new issue