Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
37b76eff30
Commit
b494f0bf3a
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren