BentoBoxWorld / BentoBox

Expandable Minecraft server plugin for island-type games like SkyBlock or AcidIsland.
https://bentobox.world
Eclipse Public License 2.0
334 stars 136 forks source link

Possible Conflict with Slimefun #773

Closed ghost closed 5 years ago

ghost commented 5 years ago

Description: While Slimefun is installed, attempting to use certain Slimefun multiblocks, or panning gravel for gold, a message appears on screen (even on OP players) stating "Sorry, but the plugin BentoBox does not allow you to break this block. Digging around I know Cs-CoreLib is the one outputting this message, but checking online I can't seem to find anyone with this error message, or I'm just not looking hard enough apparently. Any advice would be appreciated, as I'd love to use BentoBox with Slimefun installed. This error occurs outside the Skyblock world as well.

Edit Note - Using most recent Cs-Corelib 58, Slimefun 112

Steps to reproduce the behavior: 1 - Install CS-CoreLib and Slimefun, along with Bentobox and any addons (with or without addons) 2 - Use Gold Pan from Slimefun to pan Gravel to receive message.

Screenshots and videos: https://gyazo.com/aebb42095e453f4909d3126bea28c69a

Expected behavior: Expect to work together.

Environment

Server:

Plugins

ActionBarAPI, AdvancedAchievements, AsyncKeepAlive, Barrels, BentoBox, BetterEnderChests, BetterRTP, BigDoors, Blackjack, BountyHunters, ChestTerminal, Citizens, CMI, CoreArena, CoreProtect, Elevator, Enchantment Solution, Epic Spawners, FabledSkyblock, GameAPI, GroupManager, HotbarPets, ItemsAdder, Jobs, McMMO, MineTinker, MMOItems, Multiverse-Core, Parkour, PlotSquared, Placeholder API, Residence, Quickshop, ProtocolLib, Slimefun, Vault, WorldEdit, xInventories

BentoBox setup

BentoBox and Addons
- BentoBox-1.5.2-SNAPSHOT-b1160.jar
- acidisland-1.5.0.jar
- bskyblock-1.5.0.jar
- CaveBlock-1.5.0.jar
Configuration

Additional context

I sincerely apologize if this is an easy fix, or a simple error on my part.

Poslovitch commented 5 years ago

Okay, it sounds like I'll have to create a Flag directly... That's going to be interesting. Except it's going to be unlocalized... Welp...

Either way, I'll have to investigate that.

tastybento commented 5 years ago

@Poslovitch What is going on here do you think?

ghost commented 5 years ago

Ok, thought I was being crazy and missed something incredibly simple. There are a few Slimefun Multiblocks that also throw that error too.

Poslovitch commented 5 years ago

@tastybento Actually, the issue is coming from CS-CoreLib, which is a core library used by Slimefun4, the other plugin I used to contribute a lot to back in the days. I recently made a PR on the request of users on Slimefun's Discord server, that implemented a "protection hook" with BentoBox. The code looks okay, and I don't understand what could be wrong.

I'm actually wondering if this is a "misunderstanding" from users more than an actual bug. Anyway, I'd like to keep this issue opened so that I don't forget to have a closer look at this once my exams are over.

Poslovitch commented 5 years ago

This bug has been confirmed on Discord to still happen, although the CONTAINER flag is absolutely permissive.

showing the flag

showing the bug

MagmaBro123 commented 5 years ago

Yay for me. xD

tastybento commented 5 years ago

@Poslovitch This line of code will return false if the block is not on an island. I just went through @EnderBro123's database and it has some mismatched islands in the database. So, it could be that the block is being classed as not actually on the island?

@EnderBro123 - what is the coordinate of this issue? Maybe I can have a look at your database and see why it's happening.

@Poslovitch BTW, instead of doing orElse(false) at the end, it would be better to give the default setting for the world, i.e., use Flag.CONTAINER.isSetForWorld(world)

tastybento commented 5 years ago

@Poslovitch I don't think there's anything else to do here on the BentoBox code base. Close?