Fix `soft-restore` for blocks broken by players.
This commit fixes the per-arena config setting `soft-restore`. Due to
commit 92c4ce1a8b
, the soft restore logic
won't run on BlockBreakEvents, because to reach that specific part of
the event handler, the `protect` flag has to be set to `true`. However,
due to an early return in the soft restore logic if the `protect` flag
_is_ set to `true`, it is effectively impossible for it to run.
The fact that this functionality has been broken for over 6 years (!)
with almost no reports of it is perhaps a testament to how little it is
being used in the wild.
This commit is contained in:
parent
c682e45714
commit
6de0a2fa83
|
@ -18,6 +18,7 @@ These changes will (most likely) be included in the next version.
|
|||
- The Root Target ability now uses potion effects (slowness, slow falling, and negative jump boost) instead of repeated teleports. This should make for a smoother root experience.
|
||||
- Config-files with missing `pet-items` nodes no longer errors. A missing `pet-items` node in `global-settings` is treated as empty, i.e. no pet items will be registered.
|
||||
- The `player-time-in-arena` setting has been fixed.
|
||||
- The `soft-restore` setting has been fixed for blocks broken by players. Note that the functionality is still unreliable for non-trivial blocks.
|
||||
- Config-file errors imposed by incorrect usage of `/ma setting` no longer cause "internal errors". Instead, the errors are properly communicated in the command output similar to how the `/ma reload` command works.
|
||||
- The MagicSpells integration has been removed. This means that the extra `magicspells.yml` config-file (if it exists) no longer does anything and can be removed.
|
||||
|
||||
|
|
|
@ -230,9 +230,6 @@ public class ArenaListener
|
|||
return true;
|
||||
|
||||
if (softRestore) {
|
||||
if (arena.isProtected())
|
||||
return false;
|
||||
|
||||
BlockState state = b.getState();
|
||||
Repairable r = null;
|
||||
|
||||
|
|
Loading…
Reference in New Issue