Ten fixes shared by Lunar: spectator option, inventory moves, commands and placeholders
This update fixes ten bugs that were found and fixed by **Lunar** on his own servers, and that he kindly shared with us. A big thank you to Lunar for the detailed reports and for his help: without him, most of these fixes would not be in this update.
**ExecutableItems**
- Players in spectator mode no longer trigger items (loops, sneak, equip...) or use up their usages. This is optional: set `disableActivatorsInSpectator: true` in `config.yml` to enable it. Joining, leaving, dying, respawning, typed commands and items entering or leaving the inventory still work in spectator mode.
- Swapping an item to the offhand, or between the hotbar and the inventory with a number key, no longer loses or stacks its "while held" effects. Leaving the slot is now always handled before entering the new one.
- Pick block / pick item (middle click, Paper) now counts as the item leaving and entering the inventory, so effects are removed and applied like for any other move.
- The "equip" and "unequip" activators now see the real armor slot, so restricting them to a slot such as `[39]` (helmet) works.
**SCore**
- Cooldowns could throw an error on busy servers when many cooldowns expired at the same time.
Fixed.
- Commands from other plugins that start like an SCore command (for example `launchprojectile` starting with `LAUNCH`) were taken over by SCore and failed. SCore now only claims a command when the full name matches.
- A `DELAYTICK` or `DELAY` written inside another command's text (for example in a command that stores commands to run later) was read as a delay of the whole line and made the activator fail. It is now left to that command.
- Placeholders nested inside a PlaceholderAPI placeholder (like `%javascript_x_%block_lower%,a,b%`) in `IF`, `AROUND`, `NEAREST`... sub-commands were broken. They are now resolved correctly, and for each target when the command runs on several players.
- A weighted random entry written right after a placeholder (`<%placeholder%::weight>`) lost its weight.
Fixed.
- A variable whose name is built from another variable (`%var_world%var_selection%%`) works whatever the order the variables were declared in.
**ExecutableBlocks, ExecutableCrafting, ExecutableEvents, MyFurniture, ExecutableLevers, CustomPiglinsTrades**
- Rebuilt with the new SCore, no other change.
Nothing changes in your existing configs: the only new option is off by default. If something looks wrong after updating, open a post in the bug channel.
Good dev, if you have problem or suggestion join my discord !