Version 1.5.0

This commit is contained in:
jascotty2 2019-09-09 09:50:24 -05:00
parent a9ffd55cd5
commit d6ffb57c16
6 changed files with 19 additions and 19 deletions

View File

@ -4,7 +4,7 @@ stages:
variables: variables:
name: "EpicAnchors" name: "EpicAnchors"
path: "/builds/$CI_PROJECT_PATH" path: "/builds/$CI_PROJECT_PATH"
version: "1.4" version: "1.5.0"
build: build:
stage: build stage: build

View File

@ -3,7 +3,7 @@ package com.songoda.epicanchors;
import com.songoda.core.SongodaCore; import com.songoda.core.SongodaCore;
import com.songoda.core.SongodaPlugin; import com.songoda.core.SongodaPlugin;
import com.songoda.core.commands.CommandManager; 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.configuration.Config;
import com.songoda.core.gui.GuiManager; import com.songoda.core.gui.GuiManager;
import com.songoda.core.hooks.EconomyManager; import com.songoda.core.hooks.EconomyManager;
@ -34,7 +34,7 @@ public class EpicAnchors extends SongodaPlugin {
private static EpicAnchors INSTANCE; 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 final GuiManager guiManager = new GuiManager(this);
private AnchorManager anchorManager; private AnchorManager anchorManager;
@ -58,7 +58,7 @@ public class EpicAnchors extends SongodaPlugin {
@Override @Override
public void onPluginEnable() { public void onPluginEnable() {
// Run Songoda Updater // Run Songoda Updater
SongodaCore.registerPlugin(this, 31, LegacyMaterials.END_PORTAL_FRAME); SongodaCore.registerPlugin(this, 31, CompatibleMaterial.END_PORTAL_FRAME);
// Load Economy // Load Economy
EconomyManager.load(); EconomyManager.load();
@ -164,7 +164,7 @@ public class EpicAnchors extends SongodaPlugin {
} }
public ItemStack makeAnchorItem(int ticks) { 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(); ItemMeta meta = item.getItemMeta();
meta.setDisplayName(Methods.formatName(ticks, true)); meta.setDisplayName(Methods.formatName(ticks, true));
ArrayList<String> lore = new ArrayList<>(); ArrayList<String> lore = new ArrayList<>();

View File

@ -1,6 +1,6 @@
package com.songoda.epicanchors.gui; 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.Gui;
import com.songoda.core.gui.GuiUtils; import com.songoda.core.gui.GuiUtils;
import com.songoda.core.hooks.EconomyManager; 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.")); ChatColor.GRAY + Methods.makeReadable((long) (anchor.getTicksLeft() / 20) * 1000) + " remaining."));
if (EconomyManager.isEnabled() && plugin.getConfig().getBoolean("Main.Add Time With Economy")) { 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.addtimewitheconomy").getMessage(),
plugin.getLocale().getMessage("interface.button.addtimewitheconomylore") plugin.getLocale().getMessage("interface.button.addtimewitheconomylore")
.processPlaceholder("cost", Methods.formatEconomy(plugin.getConfig().getInt("Main.Economy Cost"))) .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")) { 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.addtimewithxp").getMessage(),
plugin.getLocale().getMessage("interface.button.addtimewithxplore") plugin.getLocale().getMessage("interface.button.addtimewithxplore")
.processPlaceholder("cost", String.valueOf(plugin.getConfig().getInt("Main.XP Cost"))).getMessage()), .processPlaceholder("cost", String.valueOf(plugin.getConfig().getInt("Main.XP Cost"))).getMessage()),

View File

@ -1,8 +1,8 @@
package com.songoda.epicanchors.listeners; package com.songoda.epicanchors.listeners;
import com.songoda.core.compatibility.CompatibleSounds; import com.songoda.core.compatibility.CompatibleSound;
import com.songoda.core.compatibility.LegacyMaterials; import com.songoda.core.compatibility.CompatibleMaterial;
import com.songoda.core.compatibility.ParticleHandler; import com.songoda.core.compatibility.CompatibleParticleHandler;
import com.songoda.core.compatibility.ServerVersion; import com.songoda.core.compatibility.ServerVersion;
import com.songoda.core.utils.ItemUtils; import com.songoda.core.utils.ItemUtils;
import com.songoda.epicanchors.EpicAnchors; import com.songoda.epicanchors.EpicAnchors;
@ -54,9 +54,9 @@ public class InteractListeners implements Listener {
if (player.getGameMode() != GameMode.CREATIVE) if (player.getGameMode() != GameMode.CREATIVE)
ItemUtils.takeActiveItem(player); 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; return;
} }

View File

@ -1,6 +1,6 @@
package com.songoda.epicanchors.settings; 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.compatibility.ServerVersion;
import com.songoda.core.configuration.Config; import com.songoda.core.configuration.Config;
import com.songoda.core.configuration.ConfigSetting; import com.songoda.core.configuration.ConfigSetting;
@ -71,13 +71,13 @@ public class Settings {
// convert glass pane settings // convert glass pane settings
int color; int color;
if ((color = GLASS_TYPE_1.getInt(-1)) != -1) { 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) { 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) { 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 // convert economy settings

View File

@ -1,6 +1,6 @@
package com.songoda.epicanchors.tasks; 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.core.compatibility.ServerVersion;
import com.songoda.epicanchors.EpicAnchors; import com.songoda.epicanchors.EpicAnchors;
import com.songoda.epicanchors.anchor.Anchor; import com.songoda.epicanchors.anchor.Anchor;
@ -69,7 +69,7 @@ public class AnchorTask extends BukkitRunnable {
for (Anchor anchor : plugin.getAnchorManager().getAnchors().values()) { for (Anchor anchor : plugin.getAnchorManager().getAnchors().values()) {
Location location1 = anchor.getLocation().add(.5, .5, .5); Location location1 = anchor.getLocation().add(.5, .5, .5);
if (location1.getWorld() == null) continue; 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);
} }
} }