Skip to content

Remove unused imports from several classes#59

Merged
Tofaa2 merged 5 commits into
Tofaa2:masterfrom
3add:feat/fix-chores
May 13, 2026
Merged

Remove unused imports from several classes#59
Tofaa2 merged 5 commits into
Tofaa2:masterfrom
3add:feat/fix-chores

Conversation

@3add
Copy link
Copy Markdown
Contributor

@3add 3add commented May 12, 2026

Remove unused imports from several classes, initially I was going to do a lot more cleaning up but some of it was just preference, so I decided not to include those other commits.

Summary by CodeRabbit

  • Chores
    • Performed comprehensive internal code maintenance and cleanup across all platform modules by removing unused imports and reorganizing dependency references throughout the codebase. These updates enhance code quality, improve maintainability, reduce technical debt, and strengthen overall platform stability and reliability. No changes to user-facing features, functionality, or public APIs were introduced.

Review Change Stack

Copilot AI review requested due to automatic review settings May 12, 2026 15:26
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c48185a5-1b36-4dc7-ac02-d2bdbd7dcc3b

📥 Commits

Reviewing files that changed from the base of the PR and between 87ec596 and f7219e5.

📒 Files selected for processing (21)
  • api/src/main/java/me/tofaa/entitylib/Platform.java
  • api/src/main/java/me/tofaa/entitylib/container/EntityContainer.java
  • api/src/main/java/me/tofaa/entitylib/meta/Metadata.java
  • api/src/main/java/me/tofaa/entitylib/meta/mobs/golem/ShulkerMeta.java
  • api/src/main/java/me/tofaa/entitylib/meta/other/FishingHookMeta.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityAttributes.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityEquipment.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/WrapperLivingEntity.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/hologram/ModernHologram.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProvider.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProviders.java
  • common/src/main/java/me/tofaa/entitylib/common/AbstractPlatform.java
  • platforms/spigot/src/main/java/me/tofaa/entitylib/spigot/ExtraConversionUtil.java
  • platforms/standalone/src/main/java/me/tofaa/entitylib/standalone/StandaloneEntityLibApi.java
  • platforms/velocity/src/main/java/me/tofaa/entitylib/velocity/VelocityEntityLibPlatform.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPC.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCListenerManager.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCPlayerListener.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCRegistry.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/command/NPCCommand.java
💤 Files with no reviewable changes (21)
  • api/src/main/java/me/tofaa/entitylib/Platform.java
  • platforms/velocity/src/main/java/me/tofaa/entitylib/velocity/VelocityEntityLibPlatform.java
  • common/src/main/java/me/tofaa/entitylib/common/AbstractPlatform.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/hologram/ModernHologram.java
  • platforms/standalone/src/main/java/me/tofaa/entitylib/standalone/StandaloneEntityLibApi.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCPlayerListener.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityEquipment.java
  • api/src/main/java/me/tofaa/entitylib/container/EntityContainer.java
  • api/src/main/java/me/tofaa/entitylib/meta/mobs/golem/ShulkerMeta.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/WrapperLivingEntity.java
  • api/src/main/java/me/tofaa/entitylib/meta/Metadata.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCRegistry.java
  • platforms/spigot/src/main/java/me/tofaa/entitylib/spigot/ExtraConversionUtil.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProvider.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCListenerManager.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/command/NPCCommand.java
  • spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPC.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityAttributes.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProviders.java
  • api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java
  • api/src/main/java/me/tofaa/entitylib/meta/other/FishingHookMeta.java

📝 Walkthrough

Walkthrough

This PR performs systematic import cleanup across the EntityLib codebase. Unused imports such as annotation types, stream utilities, DOM classes, and unused wrapper/utility imports are removed from API core modules, common utilities, platform implementations, and the NPC module. No functional logic, public API signatures, or control flow are modified.

Changes

Import cleanup across EntityLib modules

Layer / File(s) Summary
Core API and common import cleanup
api/src/main/java/me/tofaa/entitylib/Platform.java, api/src/main/java/me/tofaa/entitylib/container/EntityContainer.java, api/src/main/java/me/tofaa/entitylib/meta/Metadata.java, api/src/main/java/me/tofaa/entitylib/meta/mobs/golem/ShulkerMeta.java, api/src/main/java/me/tofaa/entitylib/meta/other/FishingHookMeta.java, api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityAttributes.java, api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityEquipment.java, api/src/main/java/me/tofaa/entitylib/wrapper/WrapperLivingEntity.java, api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java, api/src/main/java/me/tofaa/entitylib/wrapper/hologram/ModernHologram.java, api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProvider.java, api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProviders.java, common/src/main/java/me/tofaa/entitylib/common/AbstractPlatform.java
Unused imports removed from core API classes including annotation types (@Nullable, @NotNull), stream utilities, DOM classes, and unused utility types. ModernHologram adds explicit imports for TextDisplayMeta, Check, WrapperEntity, Adventure Component, and nullability annotations.
Platform implementations and NPC module import cleanup
platforms/spigot/src/main/java/me/tofaa/entitylib/spigot/ExtraConversionUtil.java, platforms/standalone/src/main/java/me/tofaa/entitylib/standalone/StandaloneEntityLibApi.java, platforms/velocity/src/main/java/me/tofaa/entitylib/velocity/VelocityEntityLibPlatform.java, spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPC.java, spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCListenerManager.java, spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCPlayerListener.java, spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCRegistry.java, spaceNPC/src/main/java/me/tofaa/entitylib/npc/command/NPCCommand.java
Spigot/Standalone/Velocity platform files remove unused PacketEvents and wrapper imports. NPC module removes unused packet wrapper, Bukkit, and Optional imports; updates ViaVersion imports from ViaVersionAccessor to ViaVersionUtil; and reorganizes imports to group EntityLib and NPC interaction types together.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Imports once tangled, now lie neat,
Unused declarations meet their beat,
Logger stays, while clutter flies,
Cleaner code—a rabbit's prize!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing unused imports across multiple Java files throughout the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@3add 3add changed the title feat/fix-chores Remove unused imports from several classes May 12, 2026
Copy link
Copy Markdown

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 performs a cleanup pass across the codebase to remove unused imports in multiple modules (spaceNPC, api, common, and platform implementations), reducing warnings and keeping files tidy.

Changes:

  • Removed unused Java and library imports from NPC-related classes in spaceNPC.
  • Removed unused imports from API wrapper/meta/container classes.
  • Removed unused imports from platform implementations (velocity, standalone, spigot) and common.

Reviewed changes

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

Show a summary per file
File Description
spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCRegistry.java Removed unused import.
spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCPlayerListener.java Removed unused imports.
spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPCListenerManager.java Removed unused imports.
spaceNPC/src/main/java/me/tofaa/entitylib/npc/NPC.java Removed unused imports.
spaceNPC/src/main/java/me/tofaa/entitylib/npc/command/NPCCommand.java Removed unused import.
platforms/velocity/src/main/java/me/tofaa/entitylib/velocity/VelocityEntityLibPlatform.java Removed unused imports.
platforms/standalone/src/main/java/me/tofaa/entitylib/standalone/StandaloneEntityLibApi.java Removed unused import.
platforms/spigot/src/main/java/me/tofaa/entitylib/spigot/ExtraConversionUtil.java Removed unused imports.
common/src/main/java/me/tofaa/entitylib/common/AbstractPlatform.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/wrapper/WrapperLivingEntity.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityEquipment.java Removed unused import.
api/src/main/java/me/tofaa/entitylib/wrapper/WrapperEntityAttributes.java Removed unused import.
api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProviders.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/wrapper/spawning/SpawnPacketProvider.java Removed unused import.
api/src/main/java/me/tofaa/entitylib/wrapper/hologram/ModernHologram.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/wrapper/hologram/LegacyHologram.java Removed unused import.
api/src/main/java/me/tofaa/entitylib/Platform.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/meta/other/FishingHookMeta.java Removed unused imports/blank line.
api/src/main/java/me/tofaa/entitylib/meta/mobs/golem/ShulkerMeta.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/meta/Metadata.java Removed unused imports.
api/src/main/java/me/tofaa/entitylib/container/EntityContainer.java Removed unused import.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tofaa2
Copy link
Copy Markdown
Owner

Tofaa2 commented May 13, 2026

LGTM <3

@Tofaa2 Tofaa2 merged commit 959ac8e into Tofaa2:master May 13, 2026
5 of 6 checks 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