13
0

EasterHuntReward #29

Zusammengeführt
YoyoNow hat 6 Commits von EasterHuntReward nach master 2023-04-08 00:53:10 +02:00 zusammengeführt
4 geänderte Dateien mit 37 neuen und 1 gelöschten Zeilen
Nur Änderungen aus Commit 7a621a780e werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -25,6 +25,7 @@ import de.steamwar.lobby.command.HologramCommand;
import de.steamwar.lobby.command.ModifyCommand; import de.steamwar.lobby.command.ModifyCommand;
import de.steamwar.lobby.command.PortalCommand; import de.steamwar.lobby.command.PortalCommand;
import de.steamwar.lobby.jumpandrun.JumpAndRun; import de.steamwar.lobby.jumpandrun.JumpAndRun;
import de.steamwar.lobby.jumpandrun.JumpAndRunCommand;
import de.steamwar.lobby.listener.*; import de.steamwar.lobby.listener.*;
import de.steamwar.lobby.map.CustomMapCommand; import de.steamwar.lobby.map.CustomMapCommand;
import de.steamwar.lobby.particle.ParticleListener; import de.steamwar.lobby.particle.ParticleListener;
@ -61,6 +62,7 @@ public class LobbySystem extends JavaPlugin {
new CustomMapCommand(); new CustomMapCommand();
new JumpAndRun(); new JumpAndRun();
new JumpAndRunCommand();
config = new Config(getConfig()); config = new Config(getConfig());
new PlayerSpawn(); new PlayerSpawn();

Datei anzeigen

@ -131,6 +131,8 @@ JUMP_AND_RUN_CANCEL = {0}
JUMP_AND_RUN_TIME = mm:ss SSS JUMP_AND_RUN_TIME = mm:ss SSS
JUMP_AND_RUN_FINISHED = §aFinished in {0} with {1} fails JUMP_AND_RUN_FINISHED = §aFinished in {0} with {1} fails
JUMP_AND_RUN_PERSONAL_BEST = §aNice! You beat your personal best by {0} JUMP_AND_RUN_PERSONAL_BEST = §aNice! You beat your personal best by {0}
JUMP_AND_RUN_PERSONAL_BEST_TIME = §aPersonal best in {0}
JUMP_AND_RUN_PERSONAL_BEST_NO_TIME = §cNo personal best
# Easter Egg Hunt # Easter Egg Hunt
DIFFICULTY_EASY = §aEasy DIFFICULTY_EASY = §aEasy

Datei anzeigen

@ -120,7 +120,9 @@ PARTICLE_EGG_HUNT_ADVANCED = §5Abheben
PARTICLE_EGG_HUNT_HALF = §fDie Jagd ist eröffnet PARTICLE_EGG_HUNT_HALF = §fDie Jagd ist eröffnet
JUMP_AND_RUN_FINISHED = §aBeendet in {0} mit {1} Fails JUMP_AND_RUN_FINISHED = §aBeendet in {0} mit {1} Fails
JUMP_AND_RUN_PERSONAL_BEST = §aNice! Du hast deinen Rekord um {0} Sekunden verbessert! JUMP_AND_RUN_PERSONAL_BEST = §aNice! Du hast deinen Rekord um {0} verbessert!
JUMP_AND_RUN_PERSONAL_BEST_TIME = §aDein Rekord ist {0}
JUMP_AND_RUN_PERSONAL_BEST_NO_TIME = §cDu hast noch keinen Rekord
# Easter Egg Hunt # Easter Egg Hunt
DIFFICULTY_EASY = §aLeicht DIFFICULTY_EASY = §aLeicht

Datei anzeigen

@ -0,0 +1,30 @@
package de.steamwar.lobby.jumpandrun;
import de.steamwar.command.SWCommand;
import de.steamwar.lobby.LobbySystem;
import de.steamwar.sql.UserConfig;
import org.bukkit.entity.Player;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class JumpAndRunCommand extends SWCommand {
public JumpAndRunCommand() {
super("jumpandrun");
}
@Register
public void genericCommand(Player player, String... args) {
String time = UserConfig.getConfig(player.getUniqueId(), "jump_and_run");
if (time == null) {
LobbySystem.getMessage().sendPrefixless("JUMP_AND_RUN_PERSONAL_BEST_NO_TIME", player);
return;
}
long timeLong = Long.parseLong(time);
SimpleDateFormat format = new SimpleDateFormat(LobbySystem.getMessage().parse("JUMP_AND_RUN_TIME", player), Locale.ROOT);
String parsed = format.format(new Date(timeLong));
LobbySystem.getMessage().sendPrefixless("JUMP_AND_RUN_PERSONAL_BEST_TIME", player, parsed);
}
}