Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

PlayerInteractEvent abuse #280

Open
3 tasks done
andreasdc opened this issue Dec 8, 2021 · 14 comments
Open
3 tasks done

PlayerInteractEvent abuse #280

andreasdc opened this issue Dec 8, 2021 · 14 comments
Labels
enhancement New feature or request

Comments

@andreasdc
Copy link

Observed Behavior

Standing on pressure plate when having PlayerInteractEvent cancelled results in massive spam of PlayerInteractEvents.

Expected Behavior

Normal calling of events.

Steps To Reproduce

  1. Cancel PlayerInteractEvent.
  2. Step on a pressure plate.

Plugin List

No response

Server Version

Other

No response

Agreements

  • You were able to find this issue on the latest version of NachoSpigot.
  • You have confirmed that there aren’t any issues open regarding this bug.
  • You have confirmed that you are NOT using a fork of NachoSpigot in any way. YOUR changes are not OUR faults.
@andreasdc andreasdc added the bug Something isn't working label Dec 8, 2021
@ghost
Copy link

ghost commented Dec 8, 2021

Server Version

Why don't you put your server version?

@andreasdc
Copy link
Author

Server Version

Why don't you put your server version?

It's NachoSpigot, I thought it was obvious.

@ghost
Copy link

ghost commented Dec 8, 2021

Server Version

Why don't you put your server version?

It's NachoSpigot, I thought it was obvious.

NachoSpigot is the server, not the server version.

@andreasdc
Copy link
Author

Server Version

Why don't you put your server version?

It's NachoSpigot, I thought it was obvious.

NachoSpigot is the server, not the server version.

1.8.9

@ghost
Copy link

ghost commented Dec 8, 2021

1.8.9

By the server version I mean the version of NachoSpigot, and in the issue template it states this.

@andreasdc
Copy link
Author

1.8.9

By the server version I mean the version of NachoSpigot, and in the issue template it states this.

I thought this is irrelevant with this kind of issues.

@ghost
Copy link

ghost commented Dec 8, 2021


We can't do much without a performance drop since it has to check if the pressure plate is powered.

@Lucaskyy Close as a wontfix?

@Sculas
Copy link
Collaborator

Sculas commented Dec 8, 2021

1.8.9

By the server version I mean the version of NachoSpigot, and in the issue template it states this.

I thought this is irrelevant with this kind of issues.

It's not :) We use it to identify on which commit you are. It's really handy for us, so it would be appreciated if you can add it if you create an issue.

@andreasdc
Copy link
Author

andreasdc commented Dec 8, 2021

1.8.9

By the server version I mean the version of NachoSpigot, and in the issue template it states this.

I thought this is irrelevant with this kind of issues.

It's not :) We use it to identify on which commit you are. It's really handy for us, so it would be appreciated if you can add it if you create an issue.

This wasn't touched in any commit, so I don't really think that matters in this issue.

@Sculas
Copy link
Collaborator

Sculas commented Dec 8, 2021

We can't do much without a performance drop since it has to check if the pressure plate is powered.
@Lucaskyy Close as a wontfix?

It depends. Is Reflection invoking (caused by the event firing) better performant than a check for this? And can we stop the check from being spammed too?

@Sculas
Copy link
Collaborator

Sculas commented Dec 8, 2021

1.8.9

By the server version I mean the version of NachoSpigot, and in the issue template it states this.

I thought this is irrelevant with this kind of issues.

It's not :) We use it to identify on which commit you are. It's really handy for us, so it would be appreciated if you can add it if you create an issue.

This wasn't touched in any commit, so I don't really think that matters in this issue.

Even though it doesn't matter for this issue, it might for another issue. It's not that hard to add the version, so please next time just add it.

@ghost
Copy link

ghost commented Dec 8, 2021

It depends. Is Reflection invoking (caused by the event firing) better performant than a check for this? And can we stop the check from being spammed too?

Good point, I was just thinking because we'd have to save the last event and when it happened.

@ghost
Copy link

ghost commented Dec 9, 2021

Maybe we can do the check about registed listeners != 0 and call the event, if plugins aren't listening that event, it will not fire and will save cpu usage

@Sculas Sculas added enhancement New feature or request and removed bug Something isn't working labels Dec 17, 2021
@Sculas
Copy link
Collaborator

Sculas commented Dec 17, 2021

I'm going to make this an enhancement instead since it's not necessarily a bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants