We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add backwards compatibility
BreedablePetsMC/src/main/java/me/magnum/Breedable.java
Line 54 in 33a2ce2
* */ package me.magnum; import co.aikar.commands.BukkitCommandManager; import de.leonhard.storage.Yaml; import de.leonhard.storage.sections.FlatFileSection; import lombok.Getter; import me.magnum.breedablepets.Command; import me.magnum.breedablepets.listeners.BreedListener; import me.magnum.breedablepets.listeners.EggListener; import me.magnum.breedablepets.util.Common; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.EntityType; import org.bukkit.plugin.java.JavaPlugin; public class Breedable extends JavaPlugin { @Getter private static Breedable plugin; // @Getter // private SimpleConfig cfg; @Getter private Yaml cfg; @Override public void onEnable () { plugin = this; setupConfig(); // Remain.setPlugin(plugin); // TODO Add backwards compatibility plugin.getServer().getPluginManager().registerEvents(new EggListener(), this); plugin.getServer().getPluginManager().registerEvents(new BreedListener(), this); registerCommands(); } private void setupConfig () { cfg = new Yaml("settings.yml", getDataFolder().toString(), getResource("settings.yml")); String[] header = {"Config file for BreedablePets", "by Magnum1997", "This should be self-explanatory. I tried to comment settings.", "For problems, questions, or feedback please visit", "https://github.com/Magnum97/BreedablePetsMC/issues"}; cfg.framedHeader(header); // Set defaults cfg.setDefault("parrots.hatch-chance", 10); cfg.setDefault("parrot.egg-chance", 25); cfg.setDefault("paired-egg-chance", 20); cfg.setDefault("fertile-egg-chance", 30); cfg.setDefault("hatch-chance", 10); cfg.setDefault("rare-chance", 1); FlatFileSection modifiers = cfg.getSection("modifiers"); modifiers.setDefault("wheat", 10); modifiers.setDefault("beetroot", 20); modifiers.setDefault("pumpkin", 30); modifiers.setDefault("melon", 30); modifiers.setDefault("glistering-melon", 100); } @SuppressWarnings ("deprecation") private void registerCommands () { BukkitCommandManager commandManager = new BukkitCommandManager(plugin); commandManager.registerCommand(new Command()); commandManager.enableUnstableAPI("help"); } @Override public void onDisable () { Common.log("Disabling Breed-able pets."); // Remain.setPlugin(null); // cfg.saveConfig(); cfg = null; plugin = null; } public void spawnMob (World world, Location location, EntityType mobType) { world.spawnEntity(location, mobType); } ndex 437bd41..c5e3c8d 100644 ++ b/src/main/java/me/magnum/breedablepets/Command.java
82ee36010b830dfd97cf220ba2532cc64db96808
The text was updated successfully, but these errors were encountered:
Duplicate of #15
Sorry, something went wrong.
No branches or pull requests
Add backwards compatibility
BreedablePetsMC/src/main/java/me/magnum/Breedable.java
Line 54 in 33a2ce2
82ee36010b830dfd97cf220ba2532cc64db96808
The text was updated successfully, but these errors were encountered: