Scripting
write java snippets. the client compiles them at runtime and turns each file into a
scripts clickgui module — with toggles settings cloud and local sync and hooks like
ontick and onupdate
trust boundary scripts are not sandboxed only run code you wrote or fully trust
Folder & Cloud / Local
.minecraft/config/Wsamiaw/scripts/YourScript.java
in game cloud tab then scripts has cloud and local toggles
- cloud browse load and upload community scripts (login required)
- local apply or delete files from
config/wsamiaw/scripts/
loading from cloud also saves a local .java copy so it appears under local and scripts clickgui
Quick start
.script create hellocreates a template in the scripts folder- edit the file (or paste code via cloud + add + clipboard)
.script loadrecompile everything- clickgui then scripts then enable
hello
void onEnable() {
host.log("&aScript enabled");
}
void onDisable() {
host.log("&cScript disabled");
}
void onTick() {
}
Snippet format
if the file does not declare a full public class … extends script the engine wraps your methods
in a generated class with host injected. prefer this mode
- file name (without
.java) equals module name - use fully qualified minecraft and wsamiaw types when needed (e.g.
net.minecraft.client.minecraft) - avoid enhanced
for-eachover raw lists when targeting ecj — indexed loops are safer
Lifecycle hooks
| Method | When |
|---|---|
onEnable() / onDisable() | Module toggle |
onTick() / onTick(TickEvent) | Client tick |
onUpdate(UpdateEvent e) | PRE update — use e.setRotation(yaw, pitch, prio) for silent aim |
onPostUpdate(UpdateEvent e) | POST update |
getCategory() | Optional; default Scripts |
Hooks only run while the script module is enabled.
ClickGUI settings
Declare property fields at the top of the snippet — they show under the script module in ClickGUI:
wsamiaw.property.properties.ModeProperty mode =
new wsamiaw.property.properties.ModeProperty("mode", 0, new String[]{"SILENT", "LOCK"});
wsamiaw.property.properties.FloatProperty speed =
new wsamiaw.property.properties.FloatProperty("rotation-speed", 45f, 1f, 180f);
wsamiaw.property.properties.BooleanProperty teams =
new wsamiaw.property.properties.BooleanProperty("teams", true);
void onEnable() {
host.log("&7mode=" + mode.getModeString());
}
Supported types: BooleanProperty, FloatProperty, IntProperty, ModeProperty, PercentProperty, …
Commands
| Command | Description |
|---|---|
.script create <name> | New template file |
.script load | Reload / recompile all |
.script load <name> | Reload one file |
.script list | Loaded scripts + ON/OFF |
.script folder | Open scripts directory |
Bundled: BowAimbot
on startup the client installs bowaimbot.java into your scripts folder
enable it under scripts draw a bow and aim players
mode— SILENT (packet viaUpdateEvent) or LOCK (camera)rotation-speed— max degrees per tickrange,fov,predict,teams,bot-check,only-while-drawing
If Apply fails with a compile error, run .script load after updating the client so the bundled file refreshes.
Compile tips
- jdk preferred; ecj is bundled as fallback
- compile uses
-source 8 -target 8 -g:noneto avoid verifier issues - cloud and local status bar shows the first line of compile errors
- keep logic simple — explicit types indexed loops no java 9+ syntax
Full offline notes: scripting-reference.html