Merge branch 'development'

This commit is contained in:
Brianna 2021-01-22 11:02:40 -06:00
commit 64771757b9
6 changed files with 10 additions and 22 deletions

View File

@ -5,12 +5,6 @@
<h1 align="center">EpicSpawners</h1>
<<<<<<< HEAD
=======
<<<<<<< HEAD
![N|Solid](https://i.imgur.com/jKtE7ZM.png)
=======
>>>>>>> development
<p align="center">
<b>
The simple and easy to use spawner plugin that allows you to customize everything
@ -26,11 +20,7 @@
<img alt="Patreon" src="https://img.shields.io/badge/-Support_on_Patreon-F96854.svg?logo=patreon&style=flat&logoColor=white">
</a>
<br>
<<<<<<< HEAD
<img alt="Latest" src="https://img.shields.io/badge/-ver_6.4.5-4078C0.svg?logo=github&style=flat&logoColor=white&color=blue&label=Latest&labelColor=black">
=======
<img alt="Latest" src="https://img.shields.io/badge/-ver_7.0.2-4078C0.svg?logo=github&style=flat&logoColor=white&color=blue&label=Latest&labelColor=black">
>>>>>>> development
<img alt="Latest" src="https://img.shields.io/badge/dynamic/xml?label=version&query=string%28%2F%2F%2A%5Blocal-name%28.%29%3D%27version%27%20and%20namespace-uri%28.%29%3D%27http%3A%2F%2Fmaven.apache.org%2FPOM%2F4.0.0%27%5D%5B1%5D%29&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsongoda%2FEpicSpawners%2Fmaster%2Fpom.xml&logo=github&style=flat&logoColor=white&color=blue&labelColor=black">
<a href="https://app.codacy.com/gh/songoda/EpicSpawners/dashboard">
<img alt="quality" src="https://img.shields.io/codacy/grade/1538be190da6406aa6a2bc711b2478a2">
</a>
@ -148,9 +138,7 @@ feel free to create a thread over on [our feedback site](https://feedback.songod
For suggestions about features you think should be added to the plugin to increase its functionality, feel free to create a thread or upvote an existing thread over on <a href="https://feedback.songoda.com">our feedback site</a> and it might be chosen to be added into a future update of the plugin when one of our developers are looking for new features to add to the plugin.
</p>
</article>
<br>
<p align="center">
&copy;Songoda 2021
</p>
>>>>>>> be1ae4c... Update README.MD
>>>>>>> development

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>EpicSpawners</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>7.0.2b</version>
<version>7.0.3</version>
<build>
<defaultGoal>clean install</defaultGoal>
<finalName>EpicSpawners-${project.version}</finalName>

View File

@ -89,7 +89,7 @@ public class SpawnerConvertGui extends CustomizableGui {
ItemMeta itemmeta = item.getItemMeta();
String name = spawnerData.getFirstTier().getCompiledDisplayName();
ArrayList<String> lore = new ArrayList<>();
double price = stack.getCurrentTier().getCostEconomy();
double price = spawnerData.getConvertPrice();
lore.add(plugin.getLocale().getMessage("interface.shop.buyprice").processPlaceholder("cost", EconomyManager.formatEconomy(price)).getMessage());
String loreString = plugin.getLocale().getMessage("interface.convert.lore").getMessage();

View File

@ -147,8 +147,8 @@ public class SpawnerOverviewGui extends CustomizableGui {
itemmeta.setLore(lore);
spawnerItem.setItemMeta(itemmeta);
double levelsCost = tier.getUpgradeCost(CostType.LEVELS);
double economyCost = tier.getUpgradeCost(CostType.ECONOMY);
double levelsCost = nextTier == null ? -1 : nextTier.getUpgradeCost(CostType.LEVELS);
double economyCost = nextTier == null ? -1 : nextTier.getUpgradeCost(CostType.ECONOMY);
ItemStack itemLevels = Settings.XP_ICON.getMaterial().getItem();
ItemMeta itemmetaXP = itemLevels.getItemMeta();

View File

@ -116,7 +116,7 @@ public class SpawnerData {
}
public double getConvertPrice() {
return (int) (getFirstTier().getCostEconomy() * (Double.parseDouble(convertRatio.substring(0, convertRatio.length() - 1)) / 100.0f));
return getFirstTier().getCostEconomy() * (Double.parseDouble(convertRatio.substring(0, convertRatio.length() - 1)) / 100.0f);
}
public int getKillGoal() {

View File

@ -63,8 +63,6 @@ public class SpawnerStack {
public void upgrade(Player player, CostType type) {
EpicSpawners plugin = EpicSpawners.getInstance();
double cost = currentTier.getUpgradeCost(type);
SpawnerTier oldTier = currentTier;
if (getSpawnerData().getNextTier(currentTier) == null) {
plugin.getLocale().getMessage("event.upgrade.maxed").sendPrefixedMessage(player);
@ -74,6 +72,9 @@ public class SpawnerStack {
SpawnerTier tier = getSpawnerData().getNextTier(currentTier);
SpawnerChangeEvent event = new SpawnerChangeEvent(player, spawner, tier, currentTier);
double cost = tier.getUpgradeCost(type);
SpawnerTier oldTier = currentTier;
if (type == CostType.ECONOMY) {
if (!EconomyManager.isEnabled()) {
player.sendMessage("Economy not enabled.");
@ -133,7 +134,6 @@ public class SpawnerStack {
currentTier = data.getFirstTier();
if (!spawner.merge(this, oldTier))
plugin.getDataManager().updateSpawnerStack(this, oldTier.getIdentifyingName());
try {
spawner.getCreatureSpawner().setSpawnedType(EntityType.valueOf(data.getIdentifyingName().toUpperCase()));
} catch (Exception e) {