Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with code smells. #244

Open
Pheotis opened this issue Dec 8, 2022 · 1 comment
Open

Deal with code smells. #244

Pheotis opened this issue Dec 8, 2022 · 1 comment
Labels
enhancement A suggested addition to the plugin. REWRITE This task/issue only applies to the rewritten version of the plugin (currently in ALPHA)

Comments

@Pheotis
Copy link

Pheotis commented Dec 8, 2022

Get rid of:

  • Auto-generated method stub TODOs
  • Virtual Portal vehicle compatibility

Future concerns:

  • UPKEEP_COST is unimplemented
  • DEFAULT_TERMINAL_NAME is unimplemented

Possible improvements:

  • Complaint about naming in SQLQuery
  • Missing specific event for allowing/disallowing a Stargate destroyed by an explosion
  • There is no actual validation of whether something is a valid block in GateControlBlock
  • Possible material optimization in PlayerEventListener.onPlayerInteract
  • Possibly unnecessary line in BlockEventListenerTest
  • Teleporter.hasPermission has no permission check for inter-server teleportation
  • It's not possible to override the destination of a virtual portal
  • StorageType (formerly PortalType) is kind of unnecessary as one can look for the FANCY_INTERSERVER flag
  • In Stargate.saveDefaultGates it would be nice to not have to hard-code every default gate.

Should be fixed:

  • AbstractPortal.setNetwork does not alter the database
  • AbstractPortal.setOwner does not alter the database
  • The sign format event is not called every time a sign is formatted, making a plugin overriding the format impossible
  • PortalCreationhelper.tryPortalCreation creates a message which is unused
  • In ButtonHelper.getButtonMaterial it seems that creating a Stargate with a solid block as the closed material would create a normal button even if the Stargate is underwater.
@Pheotis Pheotis converted this from a draft issue Dec 8, 2022
@Pheotis Pheotis moved this from In Progress to Todo (Addons) in 1.0.1.0 (Parity Update) Jan 2, 2023
@Pheotis Pheotis moved this from Todo (Addons) to Todo (Base) in 1.0.1.0 (Parity Update) Jan 2, 2023
@Pheotis Pheotis added this to the 1.0.0.20-ALPHA milestone Jan 2, 2023
@Pheotis Pheotis added enhancement A suggested addition to the plugin. REWRITE This task/issue only applies to the rewritten version of the plugin (currently in ALPHA) labels Jan 2, 2023
@Pheotis Pheotis changed the title Review all the //TODOs in core Deal with code smells. Jan 26, 2023
@Pheotis
Copy link
Author

Pheotis commented Jan 26, 2023

Going to hijack this issue to encompass all of the code smells as tracked on sonar.
https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=stargate-rewritten_Stargate-Bukkit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A suggested addition to the plugin. REWRITE This task/issue only applies to the rewritten version of the plugin (currently in ALPHA)
Projects
Development

No branches or pull requests

1 participant