PurpurMC / Purpur

Purpur is a drop-in replacement for Paper servers designed for configurability, and new fun and exciting gameplay features.
https://purpurmc.org
MIT License
2.05k stars 362 forks source link

cancelling event breaks entity #1599

Closed miniking1000 closed 5 days ago

miniking1000 commented 1 month ago

Spark link

https://spark.lucko.me/ob4jBvLRdv

Expected behavior

nothing to happen, I want my "minecraft:interaction" to stay as it is standard

Observed/Actual behavior

the entity(interaction entity) rotated wrong

Steps/models to reproduce

1) setup server with any plugin that cancels "PlayerInteractAtEntityEvent", for example this:

package com.example.bug;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class Bug extends JavaPlugin implements Listener {
    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onEvent(PlayerInteractAtEntityEvent event){
        event.setCancelled(true);
    }
}

2) interact with any minecraft:interaction 3) done

Purpur version

version [13:22:57 INFO]: Checking version, please wait... [13:22:57 INFO]: Current Purpur Version: 1.21.1-2324-e12a4de (MC: 1.21.1)*

  • You are running the latest version Previous: 1.21.1-2308-8332fa4 (MC: 1.21.1)

Agreements

Other

Its probably not a purpur specific bug

granny commented 1 month ago

@miniking1000 are you able to reproduce this on paper? We don't really modify anything in terms of the PlayerInteractAtEntityEvent event. Try Spigot as well in case it's not a Paper issue.

miniking1000 commented 1 month ago

Its a paper bug, I already create issue there and it's accepted

granny commented 5 days ago

Since this is an upstream bug, this issue will be closed. Updates are tracked here: https://github.com/PaperMC/Paper/issues/11496