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