mirror of
https://github.com/songoda/EpicAnchors.git
synced 2024-10-31 15:49:33 +01:00
Version 1.5.0
This commit is contained in:
parent
a9ffd55cd5
commit
d6ffb57c16
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "EpicAnchors"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.4"
|
||||
version: "1.5.0"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -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<String> lore = new ArrayList<>();
|
||||
|
@ -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()),
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user