Fixed not correctly removing genbuckets from inventory

This commit is contained in:
Niels Vergucht 2019-01-06 01:12:33 +01:00
parent 46b7903cd5
commit 99340859ca
4 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId> <groupId>com.songoda</groupId>
<artifactId>EpicBuckets</artifactId> <artifactId>EpicBuckets</artifactId>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>1.4.1</version> <version>1.4.2</version>
<build> <build>
<defaultGoal>clean package</defaultGoal> <defaultGoal>clean package</defaultGoal>
<plugins> <plugins>
@ -122,7 +122,7 @@
<url>http://nexus.hc.to/content/repositories/pub_releases</url> <url>http://nexus.hc.to/content/repositories/pub_releases</url>
</repository> </repository>
<repository> <repository>
<id>33_aikar</id> <id>3_aikar</id>
<url>https://repo.aikar.co/content/groups/aikar/</url> <url>https://repo.aikar.co/content/groups/aikar/</url>
</repository> </repository>
<repository> <repository>

View File

@ -89,7 +89,7 @@ public class GenbucketPlaceListener implements Listener {
if (e.getItem().getAmount() > 1) { if (e.getItem().getAmount() > 1) {
e.getItem().setAmount(e.getItem().getAmount() - 1); e.getItem().setAmount(e.getItem().getAmount() - 1);
} else { } else {
e.getPlayer().getInventory().remove(e.getItem()); e.getPlayer().getInventory().setItem(e.getPlayer().getInventory().getHeldItemSlot(), null);
} }
} }

View File

@ -109,7 +109,7 @@ public class Shop {
public SubShop getSubShop(XMaterial mat) { public SubShop getSubShop(XMaterial mat) {
for (SubShop subShop : subShops.values()) { for (SubShop subShop : subShops.values()) {
if (subShop.getGenItem().getType() == mat.parseMaterial() && if (subShop.getGenItem().getType() == mat.parseMaterial() &&
subShop.getGenItem().getTypeId() == mat.parseItem().getTypeId()) { subShop.getGenItem().getDurability() == mat.parseItem().getDurability()) {
return subShop; return subShop;
} }
} }

View File

@ -1,5 +1,5 @@
name: EpicBuckets name: EpicBuckets
version: 1.4.1 version: 1.4.2
description: Generate walls fast and efficient with beautiful guis! description: Generate walls fast and efficient with beautiful guis!
author: Songoda author: Songoda
main: com.songoda.epicbuckets.EpicBuckets main: com.songoda.epicbuckets.EpicBuckets