Disable block dropping through WorldGuard flags

Discussion in 'Plugin Development' started by Sir_Rosenfeld, Aug 13, 2019.

Thread Status:
Not open for further replies.
  1. Hi everyone,

    I am an advanced Java programmer and I would need a way to let people mine anywhere in the world but not collect items from mining if they mine out of their claimed chunks.

    My idea would be to disable blocks from dropping items (I can’t prevent users from picking up items, that’s too intrusive/risky) on the __global__ WorldGuard region and override it in user regions. But WorldGuard Custom Flag plug-in is outdated.

    Any idea how I could achieve that? Any idea is welcome, does a plugin like that exist? Otherwise if it isn’t too code-heavy, I can code it myself (and share it).
     
  2. Offline

    tlm920

    You could make your own way to make a selection using BlockIterator or use worldedit api.

    if you already have that BlockBreakEvent#setDropItems if the player is not in their claim.
     
  3. Offline

    Kars

    It wouldn't be code heavy. Have range of coordinates for every player that represents their claim. Upon block break event, cancel the item drop if the block is outside of the claim range of player that broke block.
     
Thread Status:
Not open for further replies.

Share This Page