Skip to content

Conversation

@SrBedrock
Copy link
Member

Added logic to hide projectiles from spectators when a player shoots a bow. Introduced SpectateManager#getSpectators() to retrieve the current spectator players. Also added @NotNull and @Unmodifiable annotations for improved type safety.

Added logic to hide projectiles from spectators when a player shoots a bow. Introduced SpectateManager#getSpectators() to retrieve the current spectator players. Also added @NotNull and @Unmodifiable annotations for improved type safety.
The @Unmodifiable annotation was removed from the getSpectators method, possibly to allow modification of the returned list or to correct an inaccurate annotation.
Copilot AI review requested due to automatic review settings October 23, 2025 22:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances spectator functionality by preventing spectators from seeing projectiles when players shoot bows and adds a method to retrieve all spectator players. The changes improve spectator isolation and provide better access to spectator information.

Key Changes:

  • Added SpectateManager#getSpectators() method to retrieve active spectator players
  • Implemented projectile hiding from spectators via EntityShootBowEvent handler
  • Enhanced type safety with @NotNull and @Unmodifiable annotations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
SpectateManager.java Added getSpectators() method to retrieve active spectator players and added @NotNull annotations for type safety
SpectateListener.java Added event handler to hide projectiles from spectators when players shoot bows, added @NotNull annotations throughout, and added redundant Listener interface implementation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SrBedrock SrBedrock merged commit 5e45690 into dev/update Oct 23, 2025
2 checks passed
@SrBedrock SrBedrock deleted the dev/fix-spec branch October 23, 2025 22:28
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.

2 participants