NCBPFluffyBear / FluffyMachines

A Slimefun4 addon that brings a variety of machines and tools to Slimefun
https://thebusybiscuit.github.io/builds/NCBPFluffyBear/FluffyMachines/master/
GNU General Public License v3.0
23 stars 41 forks source link

Scythe break RestrictedCreative plugin creative protected crops #69

Closed andris155 closed 3 years ago

andris155 commented 3 years ago

Description (Required)

The RestrictedCreative disable the block items dropped when break if placed out in the creative mode.

Steps to reproduce the Issue (Required)

  1. Use the Scythe on the creative placed crops.
  2. The Scythe breaks the RestrictedCreative block protection and crops dropped to floor.

Expected behavior (Required)

The Scythe no breaks the RestrictedCreative block protection.

Environment (Required)

[21:15:30 INFO]: This Server uses the following setup of Slimefun: Yatopia git-Yatopia-"f8c5c21" (MC: 1.16.5) Slimefun DEV - 819 (git 854c3335) Metrics-Module #21 Java 11

Installed Addons: (4) RestrictedCreative v2.4.6 SlimefunFix v2.0 LiteXpansion vDEV - 125 (git 96d1cf20) FluffyMachines vDEV - 64 (git 582f5de7)

NCBPFluffyBear commented 3 years ago

https://github.com/Slimefun/Slimefun4/wiki/Protection-Plugins

RestrictedCreative is not a listed supported protection plugin

andris155 commented 3 years ago

No API for Scythe that I can use to fix protection for RestrictedCreative?

NCBPFluffyBear commented 3 years ago

Does RestrictedCreative work on base SF tools like the explosive pickaxe?

andris155 commented 3 years ago

Yes they are supported by the RestrictedCreative plugin.

NCBPFluffyBear commented 3 years ago

From what I can see, my code supports protection plugins. Can you send a video of you breaking protected crops with the scythe vs breaking protected crops with the explosive pickaxe?

andris155 commented 3 years ago

https://www.youtube.com/watch?v=LJ2_ikiXX4Y

NCBPFluffyBear commented 3 years ago

Ok I finally understand what you mean. The issue is that the scythe can be used to obtain items that you want to prevent players from getting in creative mode. From what you told me, you mentioned block protection, so I thought you meant that you didn't want the crops to break in the first place. I'll look into this issue.

NCBPFluffyBear commented 3 years ago

Did you happen to do these: image

andris155 commented 3 years ago

?

NCBPFluffyBear commented 3 years ago

Did you do them? That is from the RestrictedCreative Spigot page.

andris155 commented 3 years ago

Yes I changed these settings in the Items.yml file.

NCBPFluffyBear commented 3 years ago

Did you already do them previously or did you just do them because I posted it?

NCBPFluffyBear commented 3 years ago

I need specifics since RestrictedCreative is a paid plugin and I can't do any testing with it.

andris155 commented 3 years ago

Since my server is disabled for explosion items I do not use this settings. But as you can see in the video it works regardless. RestrictedCreative has a good api that can be used to check if something has been placed down in a creative mode. For some extra protection, I made my own Slimefun addon. I tried cancel the Slimefun playerinteractevent with the Slimefun api, but it does not work. The Scythe removed block when this event canceled.

NCBPFluffyBear commented 3 years ago

There is no difference between the way the Explosive Pickaxe and the Scythe break/drop blocks, which makes me think that RestrictedCreative needs to add support for FM, not the other way around. The reason I asked you about the settings was because I was testing if RestrictedCreative used that itemsetting to stop item drops.

andris155 commented 3 years ago

The Scythe does not have call-explosion-event setting currently.

NCBPFluffyBear commented 3 years ago

I am aware, which is why I was asking about the itemsetting.

andris155 commented 3 years ago

If you add call-explosion-event setting to Scythe maybe fixing this problem.

NCBPFluffyBear commented 3 years ago

As we determined earlier, that is not the problem. You said yourself that you did not need to turn that setting on for the pickaxe, which means it has nothing to do with this issue.

andris155 commented 3 years ago

I said: I don't use this on my server because Explosion tools is disabled. But on my test server I enabled this setting (call-explosion-event setting). If this setting I disabled the Explosion tools protection not work.

NCBPFluffyBear commented 3 years ago

Okay, but there's another problem: The scythe doesn't explode anything. Calling an explosion event wouldn't make sense. Also... Are you sure you had it enabled? Looking at the video it looks disabled to me.

andris155 commented 3 years ago

The call-explosion-event setting enabled on the video. I tested with disabled setting, and the creative protection not work with Explosion tools.

NCBPFluffyBear commented 3 years ago

I'll just make the scythe not drop blocks when the holder is in creative.

NCBPFluffyBear commented 3 years ago

Implemented d5ed4a5