Update SpeedCommand
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
bb35ddba56
Commit
0162ee2b6a
@ -1051,6 +1051,11 @@ PANZERN_PROGRESS = §e{0} §7Blöcke übrig, §e{1} §7Blöcke pro Sekunde, §e{
|
|||||||
PANZERN_DONE = §aZuende gepanzert
|
PANZERN_DONE = §aZuende gepanzert
|
||||||
|
|
||||||
# UTILS
|
# UTILS
|
||||||
|
SPEED_HELP = §8/§espeed §8[§71§8-§710§8|§edefault§8] §8-§7 Setzte deine Flug- und Laufgeschindigkeit.
|
||||||
|
SPEED_CURRENT = §7Aktuelle geschwindigkeit§8: §e{0}
|
||||||
|
SPEED_TOO_SMALL = §c{0} ist zu klein
|
||||||
|
SPEED_TOO_HIGH = §c{0} ist zu hoch
|
||||||
|
|
||||||
TNT_CLICK_HEADER = §8---=== §eTNT §8===---
|
TNT_CLICK_HEADER = §8---=== §eTNT §8===---
|
||||||
TNT_CLICK_ORDER = §eEntity Order§8: §e{0}
|
TNT_CLICK_ORDER = §eEntity Order§8: §e{0}
|
||||||
TNT_CLICK_FUSE_TIME = §eFuseTime§8: §e{0}
|
TNT_CLICK_FUSE_TIME = §eFuseTime§8: §e{0}
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
package de.steamwar.bausystem.features.util;
|
package de.steamwar.bausystem.features.util;
|
||||||
|
|
||||||
import de.steamwar.bausystem.BauSystem;
|
import de.steamwar.bausystem.BauSystem;
|
||||||
import de.steamwar.bausystem.config.ColorConfig;
|
|
||||||
import de.steamwar.bausystem.linkage.LinkageType;
|
import de.steamwar.bausystem.linkage.LinkageType;
|
||||||
import de.steamwar.bausystem.linkage.Linked;
|
import de.steamwar.bausystem.linkage.Linked;
|
||||||
import de.steamwar.command.SWCommand;
|
import de.steamwar.command.SWCommand;
|
||||||
@ -35,21 +34,21 @@ public class SpeedCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
p.sendMessage(ColorConfig.OTHER + "/" + ColorConfig.HIGHLIGHT + "speed " + ColorConfig.OTHER + "[" + ColorConfig.HIGHLIGHT + "1" + ColorConfig.OTHER + "-" + ColorConfig.HIGHLIGHT + "10" + ColorConfig.OTHER + "] - " + ColorConfig.BASE + "Setzte deine Flug- und Laufgeschindigkeit.");
|
BauSystem.MESSAGE.sendPrefixless("SPEED_HELP", p);
|
||||||
p.sendMessage(BauSystem.PREFIX + "Aktuelle geschwindigkeit: " + ColorConfig.HIGHLIGHT + (p.getFlySpeed() * 10F));
|
BauSystem.MESSAGE.send("SPEED_CURRENT", p, (p.getFlySpeed() * 10F));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void speedCommand(Player p, float speed) {
|
public void speedCommand(Player p, float speed) {
|
||||||
speed = speed / 10F;
|
speed = speed / 10F;
|
||||||
if (speed < -1F) {
|
if (speed < -1F) {
|
||||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + speed + " ist zu klein");
|
BauSystem.MESSAGE.send("SPEED_TOO_SMALL", p, speed);
|
||||||
} else if (speed > 1F) {
|
} else if (speed > 1F) {
|
||||||
p.sendMessage(BauSystem.PREFIX + ColorConfig.DISABLE + speed + " ist zu hoch");
|
BauSystem.MESSAGE.send("SPEED_TOO_HIGH", p, speed);
|
||||||
} else {
|
} else {
|
||||||
p.setFlySpeed(speed);
|
p.setFlySpeed(speed);
|
||||||
p.setWalkSpeed(Math.min(speed + 0.1F, 1F));
|
p.setWalkSpeed(Math.min(speed + 0.1F, 1F));
|
||||||
p.sendMessage(BauSystem.PREFIX + "Aktuelle geschwindigkeit: " + ColorConfig.HIGHLIGHT + (p.getFlySpeed() * 10F));
|
BauSystem.MESSAGE.send("SPEED_CURRENT", p, (p.getFlySpeed() * 10F));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren