Dieser Commit ist enthalten in:
Ursprung
49b6f82f1a
Commit
7a621a780e
@ -25,6 +25,7 @@ import de.steamwar.lobby.command.HologramCommand;
|
||||
import de.steamwar.lobby.command.ModifyCommand;
|
||||
import de.steamwar.lobby.command.PortalCommand;
|
||||
import de.steamwar.lobby.jumpandrun.JumpAndRun;
|
||||
import de.steamwar.lobby.jumpandrun.JumpAndRunCommand;
|
||||
import de.steamwar.lobby.listener.*;
|
||||
import de.steamwar.lobby.map.CustomMapCommand;
|
||||
import de.steamwar.lobby.particle.ParticleListener;
|
||||
@ -61,6 +62,7 @@ public class LobbySystem extends JavaPlugin {
|
||||
new CustomMapCommand();
|
||||
|
||||
new JumpAndRun();
|
||||
new JumpAndRunCommand();
|
||||
|
||||
config = new Config(getConfig());
|
||||
new PlayerSpawn();
|
||||
|
@ -131,6 +131,8 @@ JUMP_AND_RUN_CANCEL = {0}
|
||||
JUMP_AND_RUN_TIME = mm:ss SSS
|
||||
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_TIME = §aPersonal best in {0}
|
||||
JUMP_AND_RUN_PERSONAL_BEST_NO_TIME = §cNo personal best
|
||||
|
||||
# Easter Egg Hunt
|
||||
DIFFICULTY_EASY = §aEasy
|
||||
|
@ -120,7 +120,9 @@ PARTICLE_EGG_HUNT_ADVANCED = §5Abheben
|
||||
PARTICLE_EGG_HUNT_HALF = §fDie Jagd ist eröffnet
|
||||
|
||||
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
|
||||
DIFFICULTY_EASY = §aLeicht
|
||||
|
30
src/de/steamwar/lobby/jumpandrun/JumpAndRunCommand.java
Normale Datei
30
src/de/steamwar/lobby/jumpandrun/JumpAndRunCommand.java
Normale Datei
@ -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);
|
||||
}
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren