bugfix/remove_anvill_costcap #76

Merged
Steev merged 2 commits from bugfix/remove_anvill_costcap into Testing 2025-12-02 21:26:49 +01:00
2 changed files with 6 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ import de.steev.bm.utils.Config;
import de.steev.bm.utils.exceptions.ConfigEntryExceptions; import de.steev.bm.utils.exceptions.ConfigEntryExceptions;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
@@ -88,4 +89,8 @@ public class BetterMinecraft extends JavaPlugin implements Listener {
// Even more Messaging // Even more Messaging
this.getLogger().info(ChatColor.AQUA + "Ich geh dann mal :c"); this.getLogger().info(ChatColor.AQUA + "Ich geh dann mal :c");
} }
public FileConfiguration getPlayerDataConfig() {
return this.playerData.getConfig();
}
} }

View File

@@ -32,7 +32,7 @@ public class KillListener implements Listener {
if(event.getEntity() instanceof Player && this.gameManager.getConfigManager().GetBool("back_command")){ if(event.getEntity() instanceof Player && this.gameManager.getConfigManager().GetBool("back_command")){
Location death = ((Player) event.getEntity()).getPlayer().getLocation(); Location death = ((Player) event.getEntity()).getPlayer().getLocation();
UUID uuid = ((Player) event.getEntity()).getPlayer().getUniqueId(); UUID uuid = ((Player) event.getEntity()).getPlayer().getUniqueId();
this.gameManager.getPlugin().getPlayerDataConfig().set("" + uuid + ".death", death); this.gameManager.getPlugin().getPlayerDataConfig().set(uuid + ".death", death);
} else if(event.getEntity() instanceof Animals) { } else if(event.getEntity() instanceof Animals) {
if(event.getEntity().toString() == "CraftPig" && this.gameManager.getConfigManager().GetBool("custom_drops")){ if(event.getEntity().toString() == "CraftPig" && this.gameManager.getConfigManager().GetBool("custom_drops")){
amounts = new int[]{ 2,2 }; amounts = new int[]{ 2,2 };