Skip to content

Add basics-speed module with /speed command - #160

Merged
mfnalex merged 2 commits into
SpigotBasics:mainfrom
JanTuck:claude/generate-essentials-prs-m7lzoq
Oct 14, 2026
Merged

mfnalex merged 2 commits into
SpigotBasics:mainfrom
JanTuck:claude/generate-essentials-prs-m7lzoq

Conversation

@JanTuck

@JanTuck JanTuck commented Oct 14, 2026 •

Copy link
Copy Markdown

Adds a new basics-speed module, an EssentialsX-style feature built on the existing Basics core: the parsed command DSL and core arguments (IntRangeArg, StringOptionArg, SelectorSinglePlayerArg).

Command Permission
/speed [walk|fly] <0-10> basics.speed
/speed [walk|fly] <0-10> <player> basics.speed.others

Tip

1 is the vanilla speed and decimals such as 1.5 are allowed. Without a type, the fly speed is changed while flying, otherwise the walk speed.

Notes

  • Self-contained: only adds modules/basics-speed, picked up automatically by settings.gradle.kts.
  • All texts are configurable in messages.yml using the shared custom tags.
  • Speeds can be decimals such as 0.5 or 1.5, parsed with core's FloatRangeArg; values outside 0-10 get core's not-in-range error.
  • Depends on Add FloatArg and FloatRangeArg #180 (adds FloatRangeArg); this branch is stacked on it, so the diff shows that commit until Add FloatArg and FloatRangeArg #180 is merged.
  • ./gradlew :core:build :modules:basics-speed:build (compile + ktlint) passes locally on Java 17.

@mfnalex

mfnalex commented Oct 14, 2026

Copy link
Copy Markdown
Member

Why is the argument an integer instead of a float? If 1 is vanilla, then 0.5 or 1.5 etc should be possible.

@JanTuck

JanTuck commented Oct 14, 2026

Copy link
Copy Markdown
Author

Good point, there was no reason for it to be an integer. Changed in 4b26352: /speed now takes decimals in 0-10 (e.g. 0.5, 1.5), with 1 still the vanilla speed and values below 1 scaling down linearly to 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EE9ZFuiZvhoWuGuZx6MPxV
@JanTuck
JanTuck force-pushed the claude/generate-essentials-prs-m7lzoq branch from 4b26352 to b4e0938 Compare October 14, 2026 15:03
@JanTuck

JanTuck commented Oct 14, 2026

Copy link
Copy Markdown
Author

Follow-up: instead of a module-local argument, the float parsing now lives in core as FloatRangeArg (#180), and this branch is rebased on top of it. Same behaviour as before: 0-10 with decimals, 1 is vanilla.

@mfnalex
mfnalex merged commit 7430c3d into SpigotBasics:main Oct 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants