mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
parent
c2b857d44c
commit
dae8a9731f
2 changed files with 11 additions and 0 deletions
|
@ -12,6 +12,7 @@ import net.shadow.client.feature.command.argument.PlayerFromNameArgumentParser;
|
|||
import net.shadow.client.feature.command.coloring.ArgumentType;
|
||||
import net.shadow.client.feature.command.coloring.PossibleArgument;
|
||||
import net.shadow.client.feature.command.coloring.StaticArgumentServer;
|
||||
import net.shadow.client.feature.command.examples.ExampleServer;
|
||||
import net.shadow.client.feature.command.exception.CommandException;
|
||||
|
||||
import java.util.Objects;
|
||||
|
@ -26,6 +27,10 @@ public class Crash extends Command {
|
|||
return StaticArgumentServer.serveFromStatic(index, new PossibleArgument(ArgumentType.STRING, Objects.requireNonNull(ShadowMain.client.world).getPlayers().stream().map(abstractClientPlayerEntity -> abstractClientPlayerEntity.getGameProfile().getName()).toList().toArray(String[]::new)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamplesEntry getExampleArguments() {
|
||||
return ExampleServer.getPlayerNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(String[] args) throws CommandException {
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.shadow.client.feature.command.Command;
|
|||
import net.shadow.client.feature.command.coloring.ArgumentType;
|
||||
import net.shadow.client.feature.command.coloring.PossibleArgument;
|
||||
import net.shadow.client.feature.command.coloring.StaticArgumentServer;
|
||||
import net.shadow.client.feature.command.examples.ExampleServer;
|
||||
import net.shadow.client.feature.command.exception.CommandException;
|
||||
import net.shadow.client.helper.event.EventListener;
|
||||
import net.shadow.client.helper.event.EventType;
|
||||
|
@ -45,6 +46,11 @@ public class Find extends Command {
|
|||
Events.registerEventHandlerClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamplesEntry getExampleArguments() {
|
||||
return ExampleServer.getPlayerNames();
|
||||
}
|
||||
|
||||
@EventListener(type = EventType.PACKET_RECEIVE)
|
||||
void pRecv(PacketEvent pe) {
|
||||
if (!pendingBook) {
|
||||
|
|
Loading…
Reference in a new issue