LabyMod / LabyMod/labymod4-server-api

Issue with disabling Perspective

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug pending
Dominant language
Java
Stars
12
Forks
3
PR merge metrics
No merged PRs in 30d

Description

General Troubleshooting
  • I am using the latest version of the LabyMod 4 Server API.
  • I am using the latest version of LabyMod.
  • I have checked for similar issues on the Issue-tracker.
  • I have checked for Pull Requests that might already address this issue.
Platforms

Velocity

Affected Minecraft Version(s)

1.21.x

Expected Behaviour

Perspective mode should be disabled even if it was enabled on a another server.

Code Example for Reproduction Steps
@Subscribe
	public void onLabyPlayerJoin(LabyModPlayerJoinEvent e) {
		// Both of these cause the issue.
		//e.labyModPlayer().disableAddons("betterperspective");
		BetterPerspectivePlayer betterPerspectivePlayer = e.labyModPlayer().getIntegrationPlayer(BetterPerspectivePlayer.class);
		betterPerspectivePlayer.denyUnlockCamera();
	}
Exception or Error
N/A
Additional Information

Perspective stays enabled on servers where it should be disabled if it was enabled before.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the LabyModPlayerJoinEvent handler and the LabyModPlayer APIs shown in the reproduction, especially disableAddons("betterperspective") and BetterPerspectivePlayer.denyUnlockCamera(). Trace how Perspective state is handled when a player joins from another server. Done means Perspective mode is disabled on this server even when it was previously enabled elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.