package de.steev.bm.utils; import de.steev.bm.Manager.GameManager; import org.bukkit.entity.Player; enum ChangelogType { SystemChangeLog, CustomChangelog } public class Changelog { private GameManager plugin; public Changelog(GameManager plugin) { this.plugin = plugin; } /** * handles getting changelog and sending it to the player * @param player the receiving player */ public void SendChangelog(Player player) { //player.sendMessage(createChangelog()); } /** * handles checking the playerdata if a player already saw the changelog * @param player the player to lookup * @return boolean which tells whether a player has seen the changelog or not */ private boolean hasPlayerSeenChangelog(ChangelogType changelogType, Player player) { // TODO: read from header what version the changelog is for // TODO: read from playerdata.yml if the player has seen the changelog for that type // TODO: return found result return false; } /*** * reads the set changlog file * @return the resulting changelog as string */ private String createChangelog(ChangelogType changelogType) { // TODO: FETCH from /*switch (changelogType) { case SystemChangeLog: // TODO: get changelog url from config // TODO: fetch version changelog from git // TODO: proccess changelog break; case CustomChangelog: // TODO: fetch changes from changes.txt found in plugin folder or from configured destination // TODO: proccess changelog break; }*/ return ""; } }