BentoBoxWorld / AOneBlock

A OneBlock Minecraft Game for BentoBox
https://docs.bentobox.world
Eclipse Public License 2.0
75 stars 29 forks source link

Bug when i break the one-block block (BlockBreakEvent) #85

Closed snattycode closed 4 years ago

snattycode commented 4 years ago

Description

Describe the bug

Hello, I found this bug: When I break the one-block, it doesn't give me the item, and it doesn't add to the counter.

Steps to reproduce the behavior

Break the one-block in survival mode.

Expected behavior

Screenshots and videos (Optional)

Environment

BentoBox Version (Mandatory)
BentoBox version: 1.14.0-SNAPSHOT-b1807

Plugins (Optional)

Plugins (53): ColoredSigns, PlaceholderAPI, ConsoleLock, CommandSpy, SkinsRestorer, AutoRestart, LockLogin, TabCompleteFilter, BackUpPlus, LuckPerms, WorldEdit, AWD, ClearLag, ChatControl, MinecraftServerManager, ProtocolLib, AdvancedPortals, eZProtector, SignEdit, CustomItems, Vault, ZeroTickFarmBlocker, 2FAPlus, EpicRename, HolographicDisplays, BlueShop, WorldGuard, Spartan, AuctionHouse, CustomHeads, MyCommand, CrazyEnchantments, PlayerKits, Essentials, AdvancedBan, Citizens, BentoBox, DeluxeMenus, EssentialsChat, TAB, CrazyCrates, ChestShop, JetsMinions, EssentialsGeoIP, EssentialsAntiBuild, EssentialsSpawn, TitleManager, Multiverse-Core, Shopkeepers, BlockParticles, VarLight, MythicMobs, Quests

Additional context (Optional)

Could not pass event BlockBreakEvent to BentoBox v1.14.0-SNAPSHOT-b1807
org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:320) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:529) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:514) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PlayerInteractManager.breakBlock(PlayerInteractManager.java:306) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:265) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PlayerInteractManager.a(PlayerInteractManager.java:152) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PlayerConnection.a(PlayerConnection.java:1197) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PacketPlayInBlockDig.a(SourceFile:40) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PacketPlayInBlockDig.a(SourceFile:10) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.TickTask.run(SourceFile:18) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeTask(SourceFile:144) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.executeNext(SourceFile:118) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.MinecraftServer.ba(MinecraftServer.java:918) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.MinecraftServer.executeNext(MinecraftServer.java:911) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.MinecraftServer.sleepForTick(MinecraftServer.java:895) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:828) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_251]
Caused by: java.lang.NoSuchMethodError: org.bukkit.block.Block.getDrops(Lorg/bukkit/inventory/ItemStack;Lorg/bukkit/entity/Entity;)Ljava/util/Collection;
    at world.bentobox.aoneblock.listeners.BlockListener.process(BlockListener.java:283) ~[?:?]
    at world.bentobox.aoneblock.listeners.BlockListener.lambda$onBlockBreak$2(BlockListener.java:199) ~[?:?]
    at java.util.Optional.ifPresent(Unknown Source) ~[?:1.8.0_251]
    at world.bentobox.aoneblock.listeners.BlockListener.onBlockBreak(BlockListener.java:199) ~[?:?]
    at sun.reflect.GeneratedMethodAccessor268.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_251]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_251]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:316) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
    ... 20 more
tastybento commented 4 years ago

I need the output of your /bbox version.

What server type are you using? It is missing API methods.

snattycode commented 4 years ago

[00:47:28 INFO]: BentoBox version: 1.14.0-SNAPSHOT-b1807 [00:47:28 INFO]: Base de datos: JSON [00:47:28 INFO]: Mundos de juego cargados: [00:47:28 INFO]: oneblock_world (OneBlock): Mundo, Nether, End [00:47:28 INFO]: Addons cargados: [00:47:28 INFO]: AOneBlock 1.3.2-SNAPSHOT-b103 (ENABLED) [00:47:28 INFO]: Chat 1.0.5 (ENABLED) [00:47:28 INFO]: Likes 1.7.1 (ENABLED) [00:47:28 INFO]: Warps 1.9.5 (ENABLED) [00:47:44 INFO]: [BentoBox] Successfully downloaded data from GitHub. That is?

I'm using Spigot 1.15.2, i don't know how to found the API methods, can you explain me?

tastybento commented 4 years ago

Try using Paper: https://papermc.io/downloads

snattycode commented 4 years ago

Yes, it worked with paper! Thank you ^^

tastybento commented 4 years ago

Okay, it was just that your build was old and it had a bug.