Skip to content

v1.5

Latest

Choose a tag to compare

@kainovaii kainovaii released this 15 Mar 18:19

MineVote 1.5

What's new

Major refactor focused on stability, consistency and maintainability. No functional regressions.


Improvements

Architecture

  • All repositories moved to instance — no more scattered static methods
  • BoostManager injected like ConfigManager — single shared instance
  • MineVote now exposes getBoostManager(), getVoterRepository(), getRewardRepository()

Domain

  • Typed getters/setters on all models — voter.getName() instead of voter.getString("name")
  • @Table added on Voter, Reward, Transaction, Service
  • Transaction and Service implemented — shop purchase logs and per-site vote logs

BoostManager

  • Counter stored in memory — no longer written to config.yml
  • static fields removed — consistent behaviour regardless of instance
  • Scheduler cleaned up

VotifierListener

  • Dead code removed
  • Boost logic fixed — if/ifif/else
  • Redundant player.isOnline() removed

ShopGui

  • Massive duplication removed — buildBase(), applyExtras(), fillShulker() shared
  • notifyPurchase() extracted

Misc

  • SQLite: fake singleton removed, properly injected
  • PlayerJoinListener: System.out.println removed
  • Javadoc added on all classes and non-trivial methods

Breaking Changes

  • VoterRepository: static methods removed — use plugin.getVoterRepository()
  • BoostManager: no-arg constructor removed — new BoostManager(plugin, configManager) required
  • SQLite: no-arg constructor removed — new SQLite(plugin) required