1 Commits

Author SHA1 Message Date
868286d462 Merge pull request 'bugfix/remove_anvill_costcap' (#73) from bugfix/remove_anvill_costcap into Testing
Some checks failed
Build and Release Minecraft Plugin / build-and-release (push) Failing after 50s
Reviewed-on: #73
2025-12-02 21:11:00 +01:00
2 changed files with 1 additions and 8 deletions

View File

@@ -4,13 +4,11 @@ import de.steev.bm.Commands.back;
import de.steev.bm.Listener.BedListener;
import de.steev.bm.Listener.InteractListener;
import de.steev.bm.Listener.KillListener;
import de.steev.bm.Listener.PrepareAnvilListener;
import de.steev.bm.Manager.GameManager;
import de.steev.bm.utils.Config;
import de.steev.bm.utils.exceptions.ConfigEntryExceptions;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@@ -45,7 +43,6 @@ public class BetterMinecraft extends JavaPlugin implements Listener {
this.getServer().getPluginManager().registerEvents(new BedListener(this.gameManager), this);
this.getServer().getPluginManager().registerEvents(new KillListener(this.gameManager), this);
this.getServer().getPluginManager().registerEvents(new InteractListener(this.gameManager), this);
this.getServer().getPluginManager().registerEvents(new PrepareAnvilListener(this.gameManager), this);
this.getServer().getPluginManager().registerEvents(this, this);
Objects.requireNonNull(this.getCommand("back")).setExecutor(new back(this.gameManager));
@@ -91,8 +88,4 @@ public class BetterMinecraft extends JavaPlugin implements Listener {
// Even more Messaging
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")){
Location death = ((Player) event.getEntity()).getPlayer().getLocation();
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) {
if(event.getEntity().toString() == "CraftPig" && this.gameManager.getConfigManager().GetBool("custom_drops")){
amounts = new int[]{ 2,2 };