From d6ffb57c16f77bf54cf1e8ba127fe25c00e9628b Mon Sep 17 00:00:00 2001 From: jascotty2 Date: Mon, 9 Sep 2019 09:50:24 -0500 Subject: [PATCH] Version 1.5.0 --- .gitlab-ci.yml | 2 +- src/main/java/com/songoda/epicanchors/EpicAnchors.java | 8 ++++---- .../java/com/songoda/epicanchors/gui/GUIOverview.java | 6 +++--- .../epicanchors/listeners/InteractListeners.java | 10 +++++----- .../com/songoda/epicanchors/settings/Settings.java | 8 ++++---- .../java/com/songoda/epicanchors/tasks/AnchorTask.java | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14c3702..f1002e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "EpicAnchors" path: "/builds/$CI_PROJECT_PATH" - version: "1.4" + version: "1.5.0" build: stage: build diff --git a/src/main/java/com/songoda/epicanchors/EpicAnchors.java b/src/main/java/com/songoda/epicanchors/EpicAnchors.java index e4339bf..32ff62f 100644 --- a/src/main/java/com/songoda/epicanchors/EpicAnchors.java +++ b/src/main/java/com/songoda/epicanchors/EpicAnchors.java @@ -3,7 +3,7 @@ package com.songoda.epicanchors; import com.songoda.core.SongodaCore; import com.songoda.core.SongodaPlugin; import com.songoda.core.commands.CommandManager; -import com.songoda.core.compatibility.LegacyMaterials; +import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.configuration.Config; import com.songoda.core.gui.GuiManager; import com.songoda.core.hooks.EconomyManager; @@ -34,7 +34,7 @@ public class EpicAnchors extends SongodaPlugin { private static EpicAnchors INSTANCE; - private Config dataFile = new Config(this, "data.yml"); + private final Config dataFile = new Config(this, "data.yml"); private final GuiManager guiManager = new GuiManager(this); private AnchorManager anchorManager; @@ -58,7 +58,7 @@ public class EpicAnchors extends SongodaPlugin { @Override public void onPluginEnable() { // Run Songoda Updater - SongodaCore.registerPlugin(this, 31, LegacyMaterials.END_PORTAL_FRAME); + SongodaCore.registerPlugin(this, 31, CompatibleMaterial.END_PORTAL_FRAME); // Load Economy EconomyManager.load(); @@ -164,7 +164,7 @@ public class EpicAnchors extends SongodaPlugin { } public ItemStack makeAnchorItem(int ticks) { - ItemStack item = getConfig().getMaterial("Main.Anchor Block Material", LegacyMaterials.END_PORTAL_FRAME).getItem(); + ItemStack item = getConfig().getMaterial("Main.Anchor Block Material", CompatibleMaterial.END_PORTAL_FRAME).getItem(); ItemMeta meta = item.getItemMeta(); meta.setDisplayName(Methods.formatName(ticks, true)); ArrayList lore = new ArrayList<>(); diff --git a/src/main/java/com/songoda/epicanchors/gui/GUIOverview.java b/src/main/java/com/songoda/epicanchors/gui/GUIOverview.java index eeddd73..c656975 100644 --- a/src/main/java/com/songoda/epicanchors/gui/GUIOverview.java +++ b/src/main/java/com/songoda/epicanchors/gui/GUIOverview.java @@ -1,6 +1,6 @@ package com.songoda.epicanchors.gui; -import com.songoda.core.compatibility.LegacyMaterials; +import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.gui.Gui; import com.songoda.core.gui.GuiUtils; import com.songoda.core.hooks.EconomyManager; @@ -52,7 +52,7 @@ public class GUIOverview extends Gui { ChatColor.GRAY + Methods.makeReadable((long) (anchor.getTicksLeft() / 20) * 1000) + " remaining.")); if (EconomyManager.isEnabled() && plugin.getConfig().getBoolean("Main.Add Time With Economy")) { - setButton(11, GuiUtils.createButtonItem(plugin.getConfig().getMaterial("Interfaces.Economy Icon", LegacyMaterials.SUNFLOWER), + setButton(11, GuiUtils.createButtonItem(plugin.getConfig().getMaterial("Interfaces.Economy Icon", CompatibleMaterial.SUNFLOWER), plugin.getLocale().getMessage("interface.button.addtimewitheconomy").getMessage(), plugin.getLocale().getMessage("interface.button.addtimewitheconomylore") .processPlaceholder("cost", Methods.formatEconomy(plugin.getConfig().getInt("Main.Economy Cost"))) @@ -61,7 +61,7 @@ public class GUIOverview extends Gui { } if (plugin.getConfig().getBoolean("Main.Add Time With XP")) { - setButton(15, GuiUtils.createButtonItem(plugin.getConfig().getMaterial("Interfaces.XP Icon", LegacyMaterials.EXPERIENCE_BOTTLE), + setButton(15, GuiUtils.createButtonItem(plugin.getConfig().getMaterial("Interfaces.XP Icon", CompatibleMaterial.EXPERIENCE_BOTTLE), plugin.getLocale().getMessage("interface.button.addtimewithxp").getMessage(), plugin.getLocale().getMessage("interface.button.addtimewithxplore") .processPlaceholder("cost", String.valueOf(plugin.getConfig().getInt("Main.XP Cost"))).getMessage()), diff --git a/src/main/java/com/songoda/epicanchors/listeners/InteractListeners.java b/src/main/java/com/songoda/epicanchors/listeners/InteractListeners.java index ed13347..93dffa3 100644 --- a/src/main/java/com/songoda/epicanchors/listeners/InteractListeners.java +++ b/src/main/java/com/songoda/epicanchors/listeners/InteractListeners.java @@ -1,8 +1,8 @@ package com.songoda.epicanchors.listeners; -import com.songoda.core.compatibility.CompatibleSounds; -import com.songoda.core.compatibility.LegacyMaterials; -import com.songoda.core.compatibility.ParticleHandler; +import com.songoda.core.compatibility.CompatibleSound; +import com.songoda.core.compatibility.CompatibleMaterial; +import com.songoda.core.compatibility.CompatibleParticleHandler; import com.songoda.core.compatibility.ServerVersion; import com.songoda.core.utils.ItemUtils; import com.songoda.epicanchors.EpicAnchors; @@ -54,9 +54,9 @@ public class InteractListeners implements Listener { if (player.getGameMode() != GameMode.CREATIVE) ItemUtils.takeActiveItem(player); - player.playSound(player.getLocation(), CompatibleSounds.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15.0F); + player.playSound(player.getLocation(), CompatibleSound.ENTITY_PLAYER_LEVELUP.getSound(), 0.6F, 15.0F); - ParticleHandler.spawnParticles(ParticleHandler.ParticleType.SPELL_WITCH, anchor.getLocation().add(.5, .5, .5), 100, .5, .5, .5); + CompatibleParticleHandler.spawnParticles(CompatibleParticleHandler.ParticleType.SPELL_WITCH, anchor.getLocation().add(.5, .5, .5), 100, .5, .5, .5); return; } diff --git a/src/main/java/com/songoda/epicanchors/settings/Settings.java b/src/main/java/com/songoda/epicanchors/settings/Settings.java index 8404550..0ed520b 100644 --- a/src/main/java/com/songoda/epicanchors/settings/Settings.java +++ b/src/main/java/com/songoda/epicanchors/settings/Settings.java @@ -1,6 +1,6 @@ package com.songoda.epicanchors.settings; -import com.songoda.core.compatibility.LegacyMaterials; +import com.songoda.core.compatibility.CompatibleMaterial; import com.songoda.core.compatibility.ServerVersion; import com.songoda.core.configuration.Config; import com.songoda.core.configuration.ConfigSetting; @@ -71,13 +71,13 @@ public class Settings { // convert glass pane settings int color; if ((color = GLASS_TYPE_1.getInt(-1)) != -1) { - config.set(GLASS_TYPE_1.getKey(), LegacyMaterials.getGlassPaneColor(color).name()); + config.set(GLASS_TYPE_1.getKey(), CompatibleMaterial.getGlassPaneColor(color).name()); } if ((color = GLASS_TYPE_2.getInt(-1)) != -1) { - config.set(GLASS_TYPE_2.getKey(), LegacyMaterials.getGlassPaneColor(color).name()); + config.set(GLASS_TYPE_2.getKey(), CompatibleMaterial.getGlassPaneColor(color).name()); } if ((color = GLASS_TYPE_3.getInt(-1)) != -1) { - config.set(GLASS_TYPE_3.getKey(), LegacyMaterials.getGlassPaneColor(color).name()); + config.set(GLASS_TYPE_3.getKey(), CompatibleMaterial.getGlassPaneColor(color).name()); } // convert economy settings diff --git a/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java b/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java index bcd4613..a357241 100644 --- a/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java +++ b/src/main/java/com/songoda/epicanchors/tasks/AnchorTask.java @@ -1,6 +1,6 @@ package com.songoda.epicanchors.tasks; -import com.songoda.core.compatibility.ParticleHandler; +import com.songoda.core.compatibility.CompatibleParticleHandler; import com.songoda.core.compatibility.ServerVersion; import com.songoda.epicanchors.EpicAnchors; import com.songoda.epicanchors.anchor.Anchor; @@ -69,7 +69,7 @@ public class AnchorTask extends BukkitRunnable { for (Anchor anchor : plugin.getAnchorManager().getAnchors().values()) { Location location1 = anchor.getLocation().add(.5, .5, .5); if (location1.getWorld() == null) continue; - ParticleHandler.redstoneParticles(location1, 255, 255, 255, 1.2F, 5, .75F); + CompatibleParticleHandler.redstoneParticles(location1, 255, 255, 255, 1.2F, 5, .75F); } }