Purpur icon indicating copy to clipboard operation
Purpur copied to clipboard

cancelling event breaks entity

Open miniking1000 opened this issue 1 year ago • 2 comments

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);
    }
}
  1. interact with any minecraft:interaction
  2. 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

  • [X] I am running the latest version of Purpur available from https://purpurmc.org/downloads.
  • [X] I have searched for and ensured there isn't already an open issue regarding this.
  • [ ] I ticked all the boxes without actually reading them
  • [X] My version of Minecraft is supported by Purpur.

Other

Its probably not a purpur specific bug

miniking1000 avatar Oct 16 '24 10:10 miniking1000

@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.

granny avatar Oct 16 '24 11:10 granny

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

miniking1000 avatar Oct 16 '24 13:10 miniking1000

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

granny avatar Nov 17 '24 22:11 granny