You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit df7a4a7
Browse filesBrowse the repository at this point in the historyBrowse files
**`Java.extend` still works but is legacy**, prefer native `class extends` for new code:
343
371
344
372
```javascript
345
373
constMyAdapter=Java.extend(PacketAdapter, {
@@ -565,6 +593,7 @@ autocomplete after the next reload.
565
593
|`/script info <path>`| Parents, extensions, load time, profiler data (avg/min/max) |
566
594
|`/script list`| Every loaded script path |
567
595
|`/script timings <enable\|disable>`| Profiler collection, on by default |
596
+
|`/script evalin <path> <code>`| Eval code in a loaded script's own scope — call a function or inspect state without editing the file. Bare variable name returns its value; anything else returns the statement's return value |
568
597
569
598
`Script.measure('name', fn)` adds your own entry to `/script info`.
Copy file name to clipboardExpand all lines: changelog.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,13 @@ updated: 2026-07-28
9
9
nav_order: 8
10
10
permalink: /changelog/
11
11
---
12
+
### 5 August 2026 - Version 41
13
+
- Added support for `class ... extends` directly against a Java class, including abstract classes like Bukkit's `Event`. `super(...)` takes the Java constructor's arguments, and `TheClass.class` gets the raw generated `Class` for registration APIs. `Java.extend` still works but is now considered legacy in favor of this.
14
+
- Improved `.d.ts` generation, fixing a lot of common gripes. Complicated lines like `world.getEntitiesByClass(ItemEntity.class).forEach((entity: org.bukkit.entity.Item) => {` now correctly resolve all types, even when it involves generics, and the generated types are now more readable.
15
+
- Errors from `.ts` files now show the correct line numbers and context source through sourcemaps that are drilled down to deltas during compilation time (little to no runtime overhead).
16
+
- Added the `evalin` command, which lets you eval code in the context of a script. Useful for manual/agentic debugging, because it lets you call indidividual functions and inspect variables in a script without having to modify the script itself. Example: `/script evalin global/features/machines/api/chainable.ts log("hello from chainable!");`
17
+
- Fixed a small bug where the `.d.ts` generator would sometimes be executed more than it should.
18
+
12
19
### 4 August 2026 - Version 40
13
20
- Merged new template repository that gets used for default projects. The new example project is based on real organization and structure from ImagineFun and DroomCraft
|[Interfaces and abstract classes](./tips-002-interfaces-and-abstract-classes.md)|`Java.extend`, interface literals, and cleaning up after third-party APIs |
14
+
|[Interfaces and abstract classes](./tips-002-interfaces-and-abstract-classes.md)|Native `class extends` for Java classes, `Java.extend` (legacy), interface literals, and cleaning up after third-party APIs |
15
15
|[TypeScript and type generation](./tips-003-typescript-and-types.md)|`definitions.d.ts`, writing `.ts` scripts, `tsconfig.json`|
16
16
|[Performance profiling](./tips-004-performance-profiling.md)| Built-in timings and where the time usually goes |
17
17
|[Built-in commands](./tips-005-built-in-commands.md)| The `/script` admin and debugging commands |
0 commit comments