Skip to content

Commit

Permalink
V0.5.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocologo committed Nov 3, 2017
1 parent 710f91a commit 580edcc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1,039 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ Websites - more info

## Features
* [Supports Minecraft 1.7.9 - 1.12.1]
* Heavily customizable
* Language support
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<mcstats.pluginname>${project.groupId}.${project.artifactId}</mcstats.pluginname>
<vault.version>1.6.6</vault.version>
<mobhunting.version>5.1.7-SNAPSHOT-B495</mobhunting.version>
<mobhunting.version>5.1.7</mobhunting.version>
<bstats.version>1.2</bstats.version>

</properties>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ depend: [Vault]
softdepend: []

commands:
mobhunt:
bagofgold:
description: Allows you to configure mobhunt
permission: bagofgold.cmd
aliases: [bag,bog,money,gold]
Expand Down
11 changes: 3 additions & 8 deletions src/one/lindegaard/BagOfGold/BagOfGoldEconomy.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.Locale;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;

Expand Down Expand Up @@ -72,11 +71,7 @@ public String format(double money) {
String pattern = "#.#####";
DecimalFormat decimalFormat = (DecimalFormat) NumberFormat.getNumberInstance(locale);
decimalFormat.applyPattern(pattern);
return ChatColor.valueOf(MobHunting.getConfigManager().dropMoneyOnGroundTextColor)
+ (MobHunting.getConfigManager().dropMoneyOnGroundItemtype.equalsIgnoreCase("ITEM")
? decimalFormat.format(money)
: MobHunting.getConfigManager().dropMoneyOnGroundSkullRewardName + " ("
+ decimalFormat.format(money) + ")");
return decimalFormat.format(money);
}

/**
Expand Down Expand Up @@ -232,7 +227,7 @@ public EconomyResponse depositPlayer(OfflinePlayer offlinePlayer, double amount)
PlayerSettings ps = MobHunting.getInstance().getPlayerSettingsmanager().getPlayerSettings(offlinePlayer);
if (offlinePlayer.isOnline()) {
ps.setBalance(Misc.round(ps.getBalance() + amount));
MobHunting.getInstance().getRewardManager().adjustBagOfGoldInPlayerInventory((Player) offlinePlayer, amount);
MobHunting.getInstance().getRewardManager().depositBagOfGoldPlayer((Player) offlinePlayer, amount);
} else {
ps.setBalanceChanges(Misc.round(ps.getBalanceChanges() + amount));
}
Expand Down Expand Up @@ -393,7 +388,7 @@ public EconomyResponse withdrawPlayer(OfflinePlayer offlinePlayer, double amount
if (balance >= amount) {
ps.setBalance(ps.getBalance() - amount);
if (offlinePlayer.isOnline())
MobHunting.getInstance().getRewardManager().adjustBagOfGoldInPlayerInventory((Player) offlinePlayer, -amount);
MobHunting.getInstance().getRewardManager().withdrawBagOfGoldPlayer((Player) offlinePlayer, amount);
else
ps.setBalanceChanges(ps.getBalanceChanges() - amount);
MobHunting.getInstance().getPlayerSettingsmanager().save(offlinePlayer);
Expand Down
Loading

0 comments on commit 580edcc

Please sign in to comment.