PGM icon indicating copy to clipboard operation
PGM copied to clipboard

Make water source forming filterable

Open RuedigerLP opened this issue 4 years ago • 5 comments

so it can be controlled with applicators.

RuedigerLP avatar Jul 09 '20 10:07 RuedigerLP

Water sources are already filterable. It's a bug in bukkit that there's no event that reports the block transformation.

Example xml that should work:

<filters>
    <deny id="no-water-sources">
      <all>
        <material>8</material>
        <cause>WORLD</cause>
      </all>
    </deny>
</filters>
<regions>
    <apply block="no-water-sources">
        <region>
            <everywhere/>
        </region>
    </apply>
</regions>

Denies material 8 (water source) if it's caused by the world (means players can still place water with buckets or by breaking ice, but ice naturally melting is denied)

Pablete1234 avatar Jul 09 '20 11:07 Pablete1234

Bukkit event added downstream. The SportPaper team is waiting for it to be PR'd up and I'll merge it in. Until then this functionality is not possible in PGM. This functionality will also only be available on servers running SportPaper.

Leaving this open until the needed SportPaper changes are brought upstream.

AustinLMayes avatar Jul 09 '20 20:07 AustinLMayes

The issue is for SportPaper independence, I don't really want to add another SportPaper dependency. Can this be done without a new event (or is the event introduced in later Bukkit versions?)

Electroid avatar Jul 11 '20 15:07 Electroid

@KingOfSquares investigated on it, and apparently, no event was being thrown by bukkit for it. I think BlockPhysicsEvent should be receiving this, but i didn't test

Pablete1234 avatar Jul 11 '20 23:07 Pablete1234

@KingOfSquares investigated on it, and apparently, no event was being thrown by bukkit for it. I think BlockPhysicsEvent should be receiving this, but i didn't test

Yep, shiny added an event for it on his fork somewhere, but not possible with just cancelling the BlockPhysicsEvents

KingOfSquares avatar Feb 10 '21 22:02 KingOfSquares