-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from OgmurHere/OgmurHere-patch-3
adds garbage cleaner command
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
src/main/java/pwn/noobs/trouserstreak/commands/GarbageCleanerCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package pwn.noobs.trouserstreak.commands; | ||
|
||
import com.mojang.brigadier.builder.LiteralArgumentBuilder; | ||
import meteordevelopment.meteorclient.commands.Command; | ||
import net.minecraft.command.CommandSource; | ||
import org.jetbrains.annotations.NotNull; | ||
import com.mojang.brigadier.arguments.FloatArgumentType; | ||
import meteordevelopment.meteorclient.utils.player.ChatUtils; | ||
import net.minecraft.command.CommandSource; | ||
import net.minecraft.text.Text; | ||
|
||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS; | ||
|
||
public class GarbageCleanerCommand extends Command { | ||
public GarbageCleanerCommand() { | ||
super("gc", "Clear RAM."); // Courtesy of youtube.com/@ogmur | ||
} | ||
|
||
@Override | ||
public void build(LiteralArgumentBuilder<CommandSource> builder) { | ||
builder.executes(context -> { | ||
{ | ||
ChatUtils.sendMsg(Text.of("Cleaning RAM."));} | ||
System.gc(); | ||
{ | ||
ChatUtils.sendMsg(Text.of("RAM Cleared."));} | ||
return SINGLE_SUCCESS; | ||
}); | ||
} | ||
} |