BentoBoxWorld / AOneBlock

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

[Bug] AOneBlock doesn't check item tool to break a block #44

Closed maxlehot1234 closed 4 years ago

maxlehot1234 commented 4 years ago

Description

Describe the bug

Hi, I use VK-AutoPickup plugin to make block breaks go directly in the player inventory instead of falling in the void as example.

This plugin works perfectly if the block was not the magic block.

Lets explain: In this example, I use the diamond_ore as example, but its the same with any block.

I put a diamond_ore and break it only with my hand. It give nothing, which is totally normal since it was not break using an iron, diamond pickaxe.

If I use worldedit to replace the magic block by a diamond_ore and break it using my hand, it gave me a diamond. So its like if BentoBox "spawn" a diamond so vk-autopickup pick it up and put it in the player inventory.

If I doesn't have VK-AutoPickup enable (I stop the server and launch it without VK-Autopickup installed, not using plugman) and use WE to set a diamond_ore instead of the magic-block and break this diamond_ore with my hand, it drop a diamond. Why? It should give nothing.

Steps to reproduce the behavior

Download and instal VK-Auto-Pickup plugin from mc-market from the teamVK. Check the issue ^^ to replicate it.

Expected behavior

BentoBox should check how the player break the block and the tool he use to break it. If its not the great tool, than drop nothing (respect the real survival system).

Environment

BentoBox Version (Mandatory)
[00:44:20 INFO]: Running PAPER 1.15.2.
[00:44:20 INFO]: BentoBox version: 1.13.0
[00:44:20 INFO]: Database: JSON
[00:44:20 INFO]: Loaded Game Worlds:
[00:44:20 INFO]: oneblock_world (OneBlock): Overworld, Nether*
[00:44:20 INFO]: Loaded Addons:
[00:44:20 INFO]: AOneBlock 1.1.5 (ENABLED)
[00:44:20 INFO]: Border 1.0.7 (ENABLED)
[00:44:20 INFO]: Level 1.9.3 (ENABLED)
[00:44:20 INFO]: Limits 1.9.4 (ENABLED)

Plugins (Optional)

Plugins (24): BentoBox, BlockVersion*, CMI, DeluxeChat, Essentials, EssentialsSpawn, FeatherBoard*, LuckPerms, LuckPermsCompat*, MultitoolPlusPro, Multiverse-Core, Multiverse-Inventories, MVdWPlaceholderAPI*, NerfPhantoms, PlaceholderAPI, ProtocolLib, ProtocolSupport, SkinsRestorer, Vault, VKAutoPickup, VoidGenerator, WorldBorderAPI*, WorldEdit, WorldGuard

Thanks again and hope this issue can be fixed, since a survival plugin that doesn't "respect" vanilla survival rules was really weird ;)

Have a nice read and a nice day/night to you.

Sorry it its not clear... I'm french.

tastybento commented 4 years ago

This is a known feature. The magic block allows you to mine anything with your hands (it is magic!) but it may take a long time. It's the only block that does this (of course).

Technically speaking, I do pass the tool used to the underlying server code, but it doesn't track hands for some reason so you get to mine with your hands. We checked Bukkit source code, and this is just what it does. So, this isn't a bug, it's a feature!

maxlehot1234 commented 4 years ago

Yeah, but the OneBlock map doesnt to this :(

Please add a true/false option.

It break the survival fun like it was right now :(

Thanks

tastybento commented 4 years ago

Sorry, it's not possible, we tried. The OneBlock map isn't a Bukkit plugin so they have different API.

maxlehot1234 commented 4 years ago

So players can only break everything with their hands without craft any tools....

Poslovitch commented 4 years ago

So players can only break everything with their hands without craft any tools....

I can understand that it's game breaking, but as tastybento said, we tried to retain the vanilla behavior. It was working "fine" from a game mechanics point of view, but it led to the player falling through the block and then getting thrown out into the void. Each time they broke the block.

The only way to avoid this is to provide the player with a platform around the magic block, which kinda defeats the whole idea of having "one" block.

Back then, I suggested tasty to add a config option for this - and to let the admins know that players falling through the block was going to happen. A lot.

tastybento commented 4 years ago

So players can only break everything with their hands without craft any tools....

Yes, this is mentioned in the FAQ.

Anyway, I have filed a bug with Spigot for this API issue: https://hub.spigotmc.org/jira/browse/SPIGOT-5718

Poslovitch commented 4 years ago

This has been fixed in the latest Spigot versions.

tastybento commented 4 years ago

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/46a138606655ce6a79e62c63a0d27e10643975ea