Singularity-DevTool is an in-game debugging/admin tool plugin for PaperMC ("a better way to debug your plugins"). Part of the Singularity Project:
| Repo | Role |
|---|---|
SingularityLib |
Core framework library (this tool depends on it) |
SingularityPlugin |
Starter template plugin |
| Singularity-DevTool (this repo) | In-game dev tools: GUI menus, player/world management, custom item manager |
Branch note: active development happens on
rework/v2(v2 line). Never pushmain.
The owner's plan says to "rework DevTool from Kotlin back to Java." Fact-check result: there is no Kotlin in this repo. All 26 source files are .java; no .kt files exist anywhere in the full git history, branches, or the pom (no Kotlin Maven plugin). The KotlinβJava rewrite requirement appears already satisfied or was based on a misremembering. Confirm with the owner before planning a port; treat "pure Java" as the standing rule for new code either way.
mvn clean package # shaded jar into target/ (JDK 25 required)- Requires JDK 25 (
java.version=25), targets Paper API26.2.build.N-stable. - Depends on
io.github.pinont:singularitylib:2.0.0-SNAPSHOTvia the${singularity.version}property β pinned to the lib's v2 line. - Resolves SingularityLib from the public registry (
https://raw.githubusercontent.com/Pinont/singularity-maven/gh-pages/) β no auth required; Paper fromrepo.papermc.io. Source compiles against lib2.0.0-SNAPSHOTfrom this registry as of the v2 API migration (see below). - Bootstrap model: SingularityLib is NOT bundled into this jar. Dependency scope is
provided, andmaven-shade-pluginartifactSetexcludescom.github.pinont:SingularityLib. At runtime the lib ships as its own plugin on the server.
Root package: com.github.pinont.devtool (26 files)
DevTool.javaβ entry point; extendsCorePlugin, emptyonPluginStart/Stop(everything registers via lib mechanisms)api/CItemManager.javaβ wrapper over lib's CustomItemManager used by menusitems/Tool.javaβ the dev tool item players hold to open the toolcommands/β/devtool,/flyspeed,/vanish(SimpleCommandstyle)events/ChatEvent.javaβ chat capture (used by world-name input flows)methods/β one-off helpers:CreateWorld,ProperWorldName,SendChat,Blank, world-creator UI builders,WorldDeleteButtonmenu/DevToolMenu.java+menu/submenu/*(11 menus) β the whole GUI surface: main menu, player management (server/specific player, kick/ban approvals), world management (server worlds, single world, creator, delete approval), custom items, other tools
Resource: src/main/resources/paper-plugin.yml β declares name: SingularityDevTool, main: com.github.pinont.devtool.DevTool, api-version: '26.2', and folia-supported: true.
- Pure Java only (no Kotlin).
- Follows lib patterns: extend
CorePlugin, useMenu/Button/Layoutfor GUIs, commands asSimpleCommand. - Class-per-action style in
methods/β keep new utilities consistent with that granularity.
Source migrated to the lib v2 signatures:
Menu(String title[, int size])βMenu(Plugin, String title[, int size])ItemCreator(Material)/ItemCreator(ItemStack)βItemCreator(Plugin, Material)/ItemCreator(Plugin, ItemStack)(+(Plugin, Material, int amount)overload)ItemHeadCreator(ItemStack)βItemHeadCreator(Plugin, ItemStack)Layoutis now a concrete class: anonymousnew Layout(){getKey()/getButton()}overrides replaced bynew Layout(char key, Button button)(Button bodies moved inline unchanged)- Plugin argument everywhere =
CorePlugin.getInstance() WorldManager.create(...)/delete(...)were removed from the lib (marked "WIP: move to Dev tool") β world creation inlined inmethods/CreateWorld.javaand deletion inlined inDeleteWorldApprovalMenuusing plain Bukkit, preserving theloadermetadata contract checked byWorldDeleteButton
β fixed onpaper-plugin.ymlname mismatchrework/v2: renamed toSingularityDevTool.Stale dependency versionβ fixed onrework/v2:${singularity.version}=2.0.0-SNAPSHOTtracking the lib v2 line.- Chat-input flows (
ChatEvent+SendChat) are fragile global state β replace with conversation API (PaperConversationFactory) during rework. - Menus rebuild state imperatively per open; no shared pagination abstraction yet (lib roadmap item).
- Test coverage: MockBukkit smoke + command-dispatch + registration tests exist under
src/test/java(seeDevToolCommandTest,DevToolRegistrationTest,DevToolTest). Deeper menu/click-simulation coverage is still thin by design (MockBukkit inventory clicks are flaky).
- New features in Java, wired through SingularityLib APIs (
CorePlugin,SimpleCommand,Menu) rather than raw Bukkit where possible. - Don't rename public classes casually β but DO fix
plugin.ymlnaming and dependency pinning early in the rework. (Descriptor naming + dep pinning now done onrework/v2.) - When touching menus, keep the menu β submenu navigation pattern; consider extracting shared confirmation-dialog logic (three near-identical approval menus exist).
- World creation/deletion code touches disk β always validate names (
ProperWorldName) before use.
- Coordinates:
com.example:singularityplugin:1.0-SNAPSHOT(Maven coordinates unchanged this pass β rename deferred to the DevTool v2 rebuild). - Provided scope rationale: bootstrap model = SingularityLib runs as its own standalone server plugin; consumers join its classpath instead of shading it in. Bundling would duplicate classes and break shared state between plugins.
- paper-plugin.yml conversion is DEFERRED to the DevTool v2 rebuild (Phase 4):
paper-plugin.ymlhas nocommands:section, so commands must be registered programmatically (LifecycleEvents.COMMANDS/ BootstrapContext API). Doing that now would mean touching every command class for zero mechanical gain; the full rebuild will handle it alongside the new command surface.