Fix CommandInfo
Fix CommandLockschem Fix CommandRedstoneTester Fix CommandSkull Fix CommandTNT Fix CommandTPSLimiter Fix CommandTrace
Dieser Commit ist enthalten in:
Ursprung
5c1e6ca74a
Commit
d16af698bf
@ -63,6 +63,8 @@ public class BauSystem extends JavaPlugin implements Listener {
|
||||
owner = null;
|
||||
}
|
||||
|
||||
Mapper.init();
|
||||
|
||||
try {
|
||||
CommandRemover.removeAll("tp", "gamemode", "time", "clear");
|
||||
CommandInjector.injectCommand(new CommandTeleport());
|
||||
|
@ -35,7 +35,7 @@ import static de.steamwar.bausystem.world.TPSUtils.getTps;
|
||||
public class CommandInfo extends SWCommand {
|
||||
|
||||
public CommandInfo() {
|
||||
super("bauinfo", "info");
|
||||
super("bauinfo");
|
||||
}
|
||||
|
||||
@Register
|
||||
|
@ -30,6 +30,7 @@ import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandLockschem implements CommandExecutor {
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
if (!(sender instanceof Player))
|
||||
|
@ -39,9 +39,7 @@ public class CommandRedstoneTester extends SWCommand {
|
||||
VersionedRunnable.call(new VersionedRunnable(() -> {
|
||||
p.sendMessage(BauSystem.PREFIX + "Der RedstoneTester ist nicht in der 1.12 verfügbar");
|
||||
}, 8), new VersionedRunnable(() -> {
|
||||
if (!permissionCheck(p)) {
|
||||
return;
|
||||
}
|
||||
if (!permissionCheck(p)) return;
|
||||
p.sendMessage(BauSystem.PREFIX + "Messe die Zeit zwischen der Aktivierung zweier Redstone Komponenten");
|
||||
SWUtils.giveItemToPlayer(p, RedstoneListener.WAND);
|
||||
}, 15));
|
||||
|
@ -39,7 +39,7 @@ public class CommandSkull extends SWCommand {
|
||||
}
|
||||
|
||||
@Register
|
||||
public void giveHelp(Player p, String skull) {
|
||||
public void giveCommand(Player p, String skull) {
|
||||
ItemStack is = SWItem.getPlayerSkull(skull).getItemStack();
|
||||
SkullMeta sm = (SkullMeta) is.getItemMeta();
|
||||
assert sm != null;
|
||||
|
@ -67,7 +67,6 @@ public class CommandTNT extends SWCommand implements Listener {
|
||||
tntToggle(region, null, null);
|
||||
}
|
||||
|
||||
|
||||
@Register
|
||||
public void setCommand(Player p, TNTMode tntMode) {
|
||||
if (!permissionCheck(p)) return;
|
||||
|
@ -52,7 +52,7 @@ public class CommandTPSLimiter extends SWCommand {
|
||||
|
||||
private BukkitTask tpsLimiter = null;
|
||||
|
||||
private List<String> arguments = new ArrayList<>(Arrays.asList("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"));
|
||||
private List<String> arguments = new ArrayList<>(Arrays.asList("0,5", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"));
|
||||
|
||||
public CommandTPSLimiter() {
|
||||
super("tpslimit");
|
||||
@ -76,20 +76,15 @@ public class CommandTPSLimiter extends SWCommand {
|
||||
}
|
||||
|
||||
@Register
|
||||
public void valueCommand(Player p, String tpsLimit) {
|
||||
public void valueCommand(Player p, double tpsLimitDouble) {
|
||||
if (!permissionCheck(p)) return;
|
||||
try {
|
||||
double tpsLimitDouble = Double.parseDouble(tpsLimit.replace(',', '.'));
|
||||
if (tpsLimitDouble < 0.5 || tpsLimitDouble > (TPSUtils.isWarpAllowed() ? 40 : 20)) {
|
||||
sendInvalidArgumentMessage(p);
|
||||
return;
|
||||
}
|
||||
currentTPSLimit = tpsLimitDouble;
|
||||
sendNewTPSLimitMessage();
|
||||
tpsLimiter();
|
||||
} catch (NumberFormatException e) {
|
||||
if (tpsLimitDouble < 0.5 || tpsLimitDouble > (TPSUtils.isWarpAllowed() ? 40 : 20)) {
|
||||
sendInvalidArgumentMessage(p);
|
||||
return;
|
||||
}
|
||||
currentTPSLimit = tpsLimitDouble;
|
||||
sendNewTPSLimitMessage();
|
||||
tpsLimiter();
|
||||
}
|
||||
|
||||
@ClassMapper(value = double.class, local = true)
|
||||
@ -98,7 +93,7 @@ public class CommandTPSLimiter extends SWCommand {
|
||||
try {
|
||||
return Double.parseDouble(s.replace(',', '.'));
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
return 0D;
|
||||
}
|
||||
}, s -> arguments);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ public class CommandTrace extends SWCommand {
|
||||
p.sendMessage("§8/§etrace stop §8- §7Stoppt den TNT-Tracer");
|
||||
p.sendMessage("§8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart");
|
||||
p.sendMessage("§8/§etrace show gui §8- §7Zeigt die Trace show gui");
|
||||
p.sendMessage("§8/§etrace show §8<§edefault§8|§eadvanced§8> §8<§e-water§8|§e-interpolate-xz§8|§e-interpolate-y§8> §8- §7Zeigt alle TNT-Positionen");
|
||||
p.sendMessage("§8/§etrace show §8<§e-water§8|§e-interpolate-xz§8|§e-interpolate-y§8> §8- §7Zeigt alle TNT-Positionen");
|
||||
p.sendMessage("§8/§etrace hide §8- §7Versteckt alle TNT-Positionen");
|
||||
p.sendMessage("§8/§etrace delete §8- §7Löscht alle TNT-Positionen");
|
||||
// p.sendMessage("§8/§etrace list §8<§7FRAME-ID§8> §8- §7Listet alle TNT auf");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren