Manually revert to 1.20.1 chomens mod
This commit is contained in:
parent
a28e984652
commit
14596cf6ed
2 changed files with 44 additions and 0 deletions
|
@ -39,6 +39,7 @@ public class CommandManager {
|
|||
AutoSkinCommand.register(this.dispatcher);
|
||||
ReloadConfigCommand.register(this.dispatcher);
|
||||
SelfCareCommand.register(this.dispatcher);
|
||||
KickCommand.register(this.dispatcher);
|
||||
}
|
||||
|
||||
public void executeCommand (String command) {
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package land.chipmunk.chipmunkmod.commands;
|
||||
|
||||
import com.mojang.brigadier.Command;
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
|
||||
import static land.chipmunk.chipmunkmod.command.CommandManager.literal;
|
||||
import static land.chipmunk.chipmunkmod.command.CommandManager.argument;
|
||||
import static com.mojang.brigadier.arguments.StringArgumentType.greedyString;
|
||||
import static com.mojang.brigadier.arguments.StringArgumentType.getString;
|
||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||
import land.chipmunk.chipmunkmod.modules.CommandCore;
|
||||
|
||||
public class KickCommand {
|
||||
public static void register (CommandDispatcher<FabricClientCommandSource> dispatcher) {
|
||||
dispatcher.register(
|
||||
literal("kick")
|
||||
.then(
|
||||
argument("player", greedyString())
|
||||
.executes(c -> run(c))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public static int run (CommandContext<FabricClientCommandSource> context) {
|
||||
|
||||
final String payloadStart = "uwu\u00a7k";
|
||||
|
||||
final String payloadEnd = "uwu";
|
||||
|
||||
final StringBuffer payload = new StringBuffer();
|
||||
payload.append(payloadStart);
|
||||
|
||||
for(int i = 0; i < 31500; i++) {
|
||||
payload.append("猫");
|
||||
}
|
||||
|
||||
payload.append(payloadEnd);
|
||||
CommandCore.INSTANCE.run("/title " + getString(context, "player") + " title \"" + payload.toString() + "\"");
|
||||
|
||||
return Command.SINGLE_SUCCESS;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue