public void onLoad() {
ModAPI.addKeyBinding(Input.KEY_G, new Callable() {
public void call() {
enabled = !enabled;
ModAPI.getPlayer().setGhostMode(enabled);
}
});
}
Full code: https://github.com/egordorichev/LastTryMods/blob/master/GhostMod/src/org/egordorichev/ghostmod/GhostMod.java
Here is the repository: https://github.com/egordorichev/LastTryIf any one is interested, please, join me! Thanks, George.