Stargate Rewritten

Stargate Rewritten

241 Downloads

Deal with code smells.

Pheotis opened this issue ยท 1 comments

commented

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.
commented

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