SteamWar/BauSystem2.0
Archiviert
12
0

Hotfix Tracer
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-04-24 16:24:31 +02:00
Ursprung 37b76eff30
Commit b494f0bf3a
5 geänderte Dateien mit 6 neuen und 17 gelöschten Zeilen

Datei anzeigen

@ -209,11 +209,10 @@ public class TraceCommand extends SWCommand {
@AllArgsConstructor
private enum ShowModeType {
ENTITY((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, 10), new ShowModeParameterType[]{}),
RAW((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, -1), new ShowModeParameterType[]{});
ENTITY((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, 10)),
RAW((player, showModeParameter) -> new EntityShowMode(player, showModeParameter, -1));
private BiFunction<Player, ShowModeParameter, ShowMode<TNTPosition>> showModeBiFunction;
private ShowModeParameterType[] removedTypes;
}
@ClassMapper(value = ShowModeParameterType.class, local = true)
@ -235,9 +234,6 @@ public class TraceCommand extends SWCommand {
@Override
public List<String> tabCompletes(CommandSender commandSender, PreviousArguments previousArguments, String s) {
Set<ShowModeParameterType> showModeParameterTypeSet = new HashSet<>();
previousArguments.getAll(ShowModeType.class).forEach(showModeType -> {
showModeParameterTypeSet.addAll(Arrays.asList(showModeType.removedTypes));
});
Arrays.stream(previousArguments.userArgs).map(showModeParameterTypesMap::get).forEach(showModeParameterTypeSet::add);
showModeParameterTypeSet.remove(null);

Datei anzeigen

@ -70,10 +70,9 @@ public abstract class AutoTraceRecorder implements TraceRecorder {
}
@Override
public Record postClear() {
public void postClear() {
recordMap.clear();
record = recordSupplier.get();
return record;
}
@Override

Datei anzeigen

@ -147,11 +147,7 @@ public class Recorder implements Listener {
}
public void postClear(Region region) {
TraceRecorder traceRecorder = get(region);
Record record = traceRecorder.postClear();
if (record != null) {
StoredRecords.add(region, record);
}
get(region).postClear();
}
@EventHandler

Datei anzeigen

@ -46,9 +46,8 @@ public class SimpleTraceRecorder implements TraceRecorder, ActiveTracer {
}
@Override
public Record postClear() {
public void postClear() {
recordMap.clear();
return record;
}
private Record.TNTRecord getRecord(TNTPrimed tntPrimed) {

Datei anzeigen

@ -30,8 +30,7 @@ public interface TraceRecorder {
String scoreboard(Player player);
default void recordSupplier(Supplier<Record> recordSupplier) {
}
default Record postClear() {
return null;
default void postClear() {
}
void spawn(TNTPrimed tntPrimed);
void tick(TNTPrimed tntPrimed);