Fix TraceCommand not having messages Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
71f1a1244e
Commit
f82d5815ee
@ -504,6 +504,10 @@ TRACE_MESSAGE_SHOW = §aAll TNT-positions shown
|
||||
TRACE_MESSAGE_HIDE = §cAll TNT-positions hidden
|
||||
TRACE_MESSAGE_CLICK_ISOLATE = §eClick to §aisolate§8/§cunisolate
|
||||
TRACE_MESSAGE_DISALLOWED = §cYou are not allowed to use the TNT-Tracer here
|
||||
TRACE_MESSAGE_SHOW_AT = §aTNT-positions shown with {0} at {1}
|
||||
TRACE_MESSAGE_SHOW_FROM = §aAll TNT-positions shown with {0} from {1}
|
||||
TRACE_MESSAGE_SHOW_FROM_TO = §aAll TNT-positions shown with {0} from {1} to {2}
|
||||
TRACE_MESSAGE_SHOW_TO_SMALLER = §cTo must be bigger then from
|
||||
|
||||
TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Starts recording of all TNT-positions
|
||||
TRACE_COMMAND_HELP_SINGLE = §8/§etrace single §8- §7Starts a single recording of all TNT-positions
|
||||
@ -511,6 +515,9 @@ TRACE_COMMAND_HELP_STOP = §8/§etrace stop §8- §7Stops the TNT-Tracer
|
||||
TRACE_COMMAND_HELP_AUTO = §8/§etrace toggleauto §8- §7Automatic start of recording
|
||||
TRACE_COMMAND_HELP_AUTO_REMOVE = §8/§etrace autoremove §8<§eParameter§8> §8- §7Remove last Trace Record automatically
|
||||
TRACE_COMMAND_HELP_SHOW = §8/§etrace show §8<§eParameter§8> - §7Shows all TNT-positions
|
||||
TRACE_COMMAND_HELP_SHOW_AT = §8/§etrace show §8(§etime§8|§7fuse§8) §7at §8<§eTIME§8> - §7Shows all Trace Positions at §8<§eTIME§8>
|
||||
TRACE_COMMAND_HELP_SHOW_FROM = §8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> - §7Shows all Trace Positions from §8<§eFROM§8>
|
||||
TRACE_COMMAND_HELP_SHOW_FROM_TO = §8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> §7to §8<§eTO§8> - §7Shows all Trace Positions from §8<§eFROM§8> to §8<§eTO§8>
|
||||
TRACE_COMMAND_HELP_HIDE = §8/§etrace hide §8- §7Hides all TNT-positions
|
||||
TRACE_COMMAND_HELP_DELETE = §8/§etrace delete §8- §7Deletes all TNT-positions
|
||||
|
||||
|
@ -473,6 +473,10 @@ TRACE_MESSAGE_SHOW = §aAlle TNT-Positionen angezeigt
|
||||
TRACE_MESSAGE_HIDE = §cAlle TNT-Positionen ausgeblendet
|
||||
TRACE_MESSAGE_CLICK_ISOLATE = §eKlicken zum §aisolieren§8/§causblenden
|
||||
TRACE_MESSAGE_DISALLOWED = §cDu darfst hier nicht den TNT-Tracer nutzen
|
||||
TRACE_MESSAGE_SHOW_AT = §aTNT-positions angezeigt mit {0} bei {1}
|
||||
TRACE_MESSAGE_SHOW_FROM = §aAll TNT-positions angezeigt mit {0} von {1}
|
||||
TRACE_MESSAGE_SHOW_FROM_TO = §aAll TNT-positions angezeigt mit {0} von {1} bis {2}
|
||||
TRACE_MESSAGE_SHOW_TO_SMALLER = §cBis muss größer als von sein
|
||||
|
||||
TRACE_COMMAND_HELP_START = §8/§etrace start §8- §7Startet die Aufnahme aller TNT-Positionen
|
||||
TRACE_COMMAND_HELP_SINGLE = §8/§etrace single §8- §7Startet eine einzelne Aufnahme aller TNT-Positionen
|
||||
@ -480,6 +484,9 @@ TRACE_COMMAND_HELP_STOP = §8/§etrace stop §8- §7Stoppt den TNT-Tracer
|
||||
TRACE_COMMAND_HELP_AUTO = §8/§etrace toggleauto §8- §7Automatischer Aufnahmenstart
|
||||
TRACE_COMMAND_HELP_AUTO_REMOVE = §8/§etrace autoremove §8<§eParameter§8> §8- §7Löscht den letzten Trace automatisch
|
||||
TRACE_COMMAND_HELP_SHOW = §8/§etrace show §8<§eParameter§8> - §7Zeigt alle TNT-Positionen
|
||||
TRACE_COMMAND_HELP_SHOW_AT = §8/§etrace show §8(§etime§8|§7fuse§8) §7at §8<§eTIME§8> - §7Zeigt alle TNT-Positionen bei §8<§eTIME§8> an
|
||||
TRACE_COMMAND_HELP_SHOW_FROM = §8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> - §7Zeigt alle TNT-Positionen von §8<§eFROM§8>
|
||||
TRACE_COMMAND_HELP_SHOW_FROM_TO = §8/§etrace show §8(§etime§8|§7fuse§8) §7from §8<§eFROM§8> §7to §8<§eTO§8> - §7Zeigt alle TNT-Positionen zwischen §8<§eFROM§8> und §8<§eTO§8>
|
||||
TRACE_COMMAND_HELP_HIDE = §8/§etrace hide §8- §7Versteckt alle TNT-Positionen
|
||||
TRACE_COMMAND_HELP_DELETE = §8/§etrace delete §8- §7Löscht alle TNT-Positionen
|
||||
|
||||
|
@ -124,22 +124,31 @@ public class TraceCommand extends SWCommand {
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_AUTO_DELETE_" + autoTraceRecorder.getTraceRecordAutoDeletion().name(), p);
|
||||
}
|
||||
|
||||
@Register(value = {"show"})
|
||||
@Register(value = {"show"}, description = "TRACE_COMMAND_HELP_SHOW_AT")
|
||||
public void showAtCommand(@Validator Player p, @OptionalValue("time") @StaticValue({"time", "fuse"}) String type, @StaticValue("at") String __, @Min(intValue = 0) int at) {
|
||||
showFromToCommand(p, type, __, at, __, at);
|
||||
internalSetShowFilter(p, "TRACE_MESSAGE_SHOW_AT", type, at, at);
|
||||
}
|
||||
|
||||
@Register(value = {"show"})
|
||||
@Register(value = {"show"}, description = "TRACE_COMMAND_HELP_SHOW_FROM")
|
||||
public void showFromCommand(@Validator Player p, @OptionalValue("time") @StaticValue({"time", "fuse"}) String type, @StaticValue("from") String __, @Min(intValue = 0) int from) {
|
||||
if (from == 0) {
|
||||
TraceShowManager.setShowFilter(p, null);
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", p);
|
||||
return;
|
||||
}
|
||||
showFromToCommand(p, type, __, from, __, Integer.MAX_VALUE);
|
||||
internalSetShowFilter(p, "TRACE_MESSAGE_SHOW_FROM", type, from, Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
@Register(value = {"show"})
|
||||
@Register(value = {"show"}, description = "TRACE_COMMAND_HELP_SHOW_FROM_TO")
|
||||
public void showFromToCommand(@Validator Player p, @OptionalValue("time") @StaticValue({"time", "fuse"}) String type, @StaticValue("from") String __, @Min(intValue = 0) int from, @StaticValue("to") String ___, @Min(intValue = 0) int to) {
|
||||
internalSetShowFilter(p, "TRACE_MESSAGE_SHOW_FROM_TO", type, from, to);
|
||||
}
|
||||
|
||||
private void internalSetShowFilter(Player p, String message, String type, int from, int to) {
|
||||
if (to < from) {
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW_TO_SMALLER", p);
|
||||
return;
|
||||
}
|
||||
TraceShowManager.setShowFilter(p, tntPosition -> {
|
||||
switch (type) {
|
||||
case "time":
|
||||
@ -150,6 +159,7 @@ public class TraceCommand extends SWCommand {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
BauSystem.MESSAGE.send(message, p, type, from, to);
|
||||
}
|
||||
|
||||
// /trace show at 0
|
||||
|
@ -344,7 +344,9 @@ public class PlaceItemUtils {
|
||||
SkullMeta skullMeta = (SkullMeta) itemMeta;
|
||||
Skull skull = (Skull) block.getState();
|
||||
skull.setOwnerProfile(skullMeta.getOwnerProfile());
|
||||
skull.setOwningPlayer(skullMeta.getOwningPlayer());
|
||||
if (skullMeta.getOwningPlayer() != null) {
|
||||
skull.setOwningPlayer(skullMeta.getOwningPlayer());
|
||||
}
|
||||
skull.update(true, false);
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren