halted Changelog Screen refactor

This commit is contained in:
2025-12-02 20:39:39 +01:00
parent 59611ac1d1
commit 95dd560779
5 changed files with 45 additions and 10 deletions

View File

@@ -63,10 +63,9 @@ public class BetterMinecraft extends JavaPlugin implements Listener {
UUID uuid = p.getUniqueId();
try {
// prevent this allways resetting the job count
if (this.playerData.readBooleanFromConfig(uuid + "." + Version + ".read")) {
p.sendMessage("================= Better Minecraft " + Version + " =================");
p.sendMessage("Command: /back eingefügt");
p.sendMessage("Amboss Kostengrenze entfernt");
p.sendMessage("=====================================================");
this.playerData.writeStringToConfig(uuid + ".name", p.getName());

View File

@@ -3,6 +3,11 @@ 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;
@@ -15,15 +20,18 @@ public class Changelog {
* @param player the receiving player
*/
public void SendChangelog(Player player) {
player.sendMessage(createChangelog());
//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 or not a player has seen the changelog
* @return boolean which tells whether a player has seen the changelog or not
*/
private boolean hasPlayerSeenChangelog(Player player) {
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;
}
@@ -31,7 +39,22 @@ public class Changelog {
* reads the set changlog file
* @return the resulting changelog as string
*/
private String createChangelog() {
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 "";
}
}