Skip to content

Commit 3b1d492

Browse files
author
mina987
authored
Fix bug
Fix errors when breaking the composter
1 parent 31fff1a commit 3b1d492

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/main/java/ru/m9studio/ComposterTrashBox/PluginListener.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import org.bukkit.event.block.Action;
66
import org.bukkit.event.player.PlayerInteractEvent;
77
import org.bukkit.inventory.ItemStack;
8-
import org.bukkit.inventory.PlayerInventory;
9-
108
public class PluginListener implements org.bukkit.event.Listener
119
{
1210
@EventHandler
@@ -15,9 +13,9 @@ public void onPlayerInteractEntityEvent(PlayerInteractEvent e)
1513
ItemStack I = e.getPlayer().getInventory().getItemInMainHand();
1614
if
1715
(
16+
e.getAction() == Action.RIGHT_CLICK_BLOCK &&
1817
e.getClickedBlock().getType() == Material.COMPOSTER &&
19-
e.getAction() == Action.RIGHT_CLICK_BLOCK &&
20-
I.getType() != Material.AIR
18+
I.getType() != Material.AIR
2119
)
2220
{
2321
int amount = 0;

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: ComposterTrashBox
2-
version: '1.0.1'
2+
version: '1.1.1'
33
main: ru.m9studio.ComposterTrashBox.ComposterTrashBox
44
api-version: '1.20'
55
author: mina987

0 commit comments

Comments
 (0)