Purpur: addPotionEffect() does not work as intended with Darkness

Spark link

https://spark.lucko.me/YMnoyysEZl

Expected behavior

The vanilla darkness effect, such as /effect give @s darkness 15 grants the player the Skulk Shrieker’s DARKNESS effect to the player for 15 seconds.

Observed/Actual behavior

When Skript tries to do this, such as with:

command /heartbeat <player>:
    trigger:
        apply potion of darkness to arg 1 for 15 seconds

The client’s screen goes entirely black, rather than apply the effect correctly. image

Steps/models to reproduce

Create a fresh server running Purpur (tested builds 1752, 1800, and latest 1835), and place Skript 2.6.3 in the plugins folder. Utilize this Skript to test the effect via the /heartbeat <in-game player> command: heartbeat.txt (save as a skript in the /plugins/Skript/scripts/ folder as heartbeat.sk to execute)

Purpur version

Current: git-Purpur-1835 (MC: 1.19.2)* Previous: git-Purpur-1752 (MC: 1.19.2)

  • You are running the latest version

Also tested with Purpur-1800 and Purpur-1752 after initial latest tests failed.

Agreements

  • I am running the latest version of Purpur available from https://purpurmc.org/downloads.
  • I have searched for and ensured there isn’t already an open issue regarding this.
  • My version of Minecraft is supported by Purpur.

Other

Tested with the same setup using Paper server setups had no issues; only upgrading from Paper to Purpur on various 1.19.2 builds is when this issue appeared.

Multiple users have confirmed the issue using vanilla, 1.19.2 clients with no mods, shaders or resource packs active.

Skript community has been made aware of the behavior and recommended this be explored here, as the issue is only able to be reproduced on a Purpur server and not native to Paper nor Skript itself.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Issue can be replicated with

    @EventHandler
    public static void onPunch(PlayerInteractEvent event){
            PotionEffect darkness = new PotionEffect(PotionEffectType.DARKNESS, 100, 0);
            event.getPlayer().addPotionEffect(darkness);
    }

as well. Issue might benefit from a namechange, ‘addPotionEffect() does not work as intended with the darkness effect’ or something.

interesting I’ll test when I get a chance (couple hours probably)

Perfect; I’ll test this in Pufferfish builds and see where that lands. Thanks for the guidance!