Skip to content

Support Floodgate (Bedrock) left-click selling and add build artifact workflow#4

Open
iphonetips1 wants to merge 3 commits into
masterfrom
codex/linear-mention-3pdev-221-left-click-sellwand-gives-no-mone-p11ll1
Open

Support Floodgate (Bedrock) left-click selling and add build artifact workflow#4
iphonetips1 wants to merge 3 commits into
masterfrom
codex/linear-mention-3pdev-221-left-click-sellwand-gives-no-mone-p11ll1

Conversation

@iphonetips1
Copy link
Copy Markdown

Motivation

  • Allow Bedrock players (via Floodgate/Floodgate API) to use left-click to trigger a sell to match platform UX differences while preserving cooldown behavior.
  • Add a CI workflow to produce and upload a plugin jar artifact on pull requests and manual runs.

Description

  • Treat left-clicks as valid sell attempts when the interacting player is a Bedrock/Floodgate player by introducing a shouldSell condition and using it for sell logic and cooldown checks.
  • Added isBedrockPlayer(Player) which uses reflection to call org.geysermc.floodgate.api.FloodgateApi#getInstance and isFloodgatePlayer(UUID) so the plugin does not hard-depend on Floodgate at compile time and safely falls back if the API is absent or inaccessible.
  • Updated logic so cooldown enforcement uses the new shouldSell boolean and consolidated the sell handling branch to use it instead of only Action.RIGHT_CLICK_BLOCK.
  • Added a GitHub Actions workflow .github/workflows/build-artifact.yml that sets up Java (Temurin 21), caches Maven, runs mvn -B -DskipTests package, and uploads target/*.jar (excluding original-*.jar) as the AxSellwands-jar artifact on pull requests or manual dispatches.

Testing

  • No automated unit tests were executed by this change because the workflow is configured to run mvn -DskipTests package which explicitly skips test execution.
  • A CI packaging job was added to build and upload the jar artifact via the new GitHub Actions workflow and will run on pull requests or manual workflow_dispatch events.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant