bugfix/remove_anvill_costcap #74

Merged
Steev merged 33 commits from bugfix/remove_anvill_costcap into main 2025-12-02 21:16:39 +01:00
5 changed files with 45 additions and 10 deletions
Showing only changes of commit 95dd560779 - Show all commits

View File

@@ -6,7 +6,7 @@
<groupId>de.steev.bm</groupId>
<artifactId>BetterMinecraft</artifactId>
<version>stable</version>
<version>1.2.2</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
@@ -25,7 +25,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.20.1-R0.1-SNAPSHOT</version>
<version>1.21.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

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 "";
}
}

View File

@@ -0,0 +1,13 @@
# changelog
system_changelog: true
system_changelog_location: https://git.slpnetwork.de/Steev/betterminecraft/src/branch/main/changelog.txt
custom_changelog: true
custom_changelog_location: custom_changelog.txt
# features
changelog: true # if this is toggled the whole changelog system is enabled or disabled
improved_bed: true # toggles whether the night should be skipped when half the server players sleep
custom_drops: false # toggles if custom drops should be enabled
custom_recipes: false # toggles if custom recipes should be enabled
replanting: true # toggles the right click replant feature
back_command: true # toggles the back to death point feature

View File

@@ -1,7 +1,7 @@
name: BetterMinecraft
main: de.steev.bm.BetterMinecraft
version: 1.0
api-version: 1.17
version: 1.2.2
api-version: 1.21
commands:
back:
description: "teleports players back to their deathpoint"