Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
5.2.3 bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Thatsmusic99 committed Nov 13, 2018
1 parent 1fc0d03 commit da6939c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void load(boolean aaaan) {
v = 1.0;
}
for (HeadsPlusChallengeEnums hpc : HeadsPlusChallengeEnums.values()) {
if (hpc.v > v) {
if (hpc.v > v || v == 1.0) {
getConfig().addDefault("challenges." + hpc.cd.name() + "." + hpc.n + ".name", hpc.dName);
getConfig().addDefault("challenges." + hpc.cd.name() + "." + hpc.n + ".header", hpc.h);
getConfig().addDefault("challenges." + hpc.cd.name() + "." + hpc.n + ".description", hpc.d);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void reloadC(boolean a) {
config = YamlConfiguration.loadConfiguration(configF);
getConfig().addDefault("options.version", cVersion);
getConfig().addDefault("options.default-price", 10.00);
getConfig().addDefault("options.price-per-world.example-one", 15.00);
// getConfig().addDefault("options.price-per-world.example-one", 15.00);
getConfig().addDefault("options.advent-calendar", true);
getConfig().addDefault("options.christmas-hype", 0);
if (getConfig().getBoolean("options.advent-calendar")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ public void onClick(Player p, InventoryManager im, InventoryClickEvent e) {
}

private void giveHead(Player p, InventoryClickEvent e) {
NMSManager nms = HeadsPlus.getInstance().getNMS();
if (p.getInventory().firstEmpty() == -1) {
p.sendMessage(hpc.getString("full-inv"));
e.setCancelled(true);
return;
}
if (e.getCurrentItem().getItemMeta().getLore() != null) {
if (nms.getPrice(e.getCurrentItem()) != 0.0 && HeadsPlus.getInstance().econ()) {

Economy ef = HeadsPlus.getInstance().getEconomy();
Double price = HeadsPlus.getInstance().getNMS().getPrice(e.getCurrentItem());
if (price > ef.getBalance(p)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private void fireEvent(InventoryClickEvent e) {

private void denyPermission(InventoryClickEvent e) {
Material m = HeadsPlus.getInstance().getNMS().getSkullMaterial(1).getType();
if(e.getSlot() == 0){
if(e.getRawSlot() == 0){
if(e.getCurrentItem().getType() == m){
e.getWhoClicked().sendMessage(ChatColor.RED + "You can not craft heads!");
e.setCancelled(true);
Expand Down
2 changes: 1 addition & 1 deletion main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
main: io.github.thatsmusic99.headsplus.HeadsPlus
name: HeadsPlus
version: 5.2.2
version: 5.2.3
api-version: 1.13
description: Spawns in heads with extra features.
author: Thatsmusic99
Expand Down

0 comments on commit da6939c

Please sign in to comment.