hpfxd / PandaSpigot

Fork of Paper for 1.8.8 focused on improved performance and stability.
GNU General Public License v3.0
229 stars 65 forks source link

PlayerOpEvent #163

Open literally1984 opened 10 months ago

literally1984 commented 10 months ago

This is more of a suggestion than an issue but it would be nice if there was an event which was fired whenever a player is opped (whether that be from using /op or a plugin doing player.setOp().

iamnoksio commented 10 months ago

useless do it in plugin

literally1984 commented 10 months ago

useless do it in plugin

Right now I am using a BukkitRunnable, but I think that an actual event would be better.

iamnoksio commented 10 months ago

useless do it in plugin

Right now I am using a BukkitRunnable, but I think that an actual event would be better.

There's A LOT of better ways to do it without using a Runnable

iamnoksio commented 10 months ago

or there's something called: do it yourself

andreasdc commented 10 months ago

What are you trying to achieve?

literally1984 commented 10 months ago

or there's something called: do it yourself

You could say that every event Pandaspigot has backported is useless then, because one could do it themself.

andreasdc commented 10 months ago

or there's something called: do it yourself

You could say that every event Pandaspigot has backported is useless then, because one could do it themself.

Will you say what do you want to achieve or not

literally1984 commented 10 months ago

or there's something called: do it yourself

You could say that every event Pandaspigot has backported is useless then, because one could do it themself.

Will you say what do you want to achieve or not

What do you mean?

andreasdc commented 10 months ago

What do you need that feature for?

literally1984 commented 10 months ago

What do you need that feature for?

I would like to have the feature to cancel anybody save a few whitelisted players from getting op. I'm already accomplishing this by using a BukkitRunnable and checking the op list every few seconds, but I feel as though an actual event would be better.

andreasdc commented 10 months ago

You can modify setting op using reflection and add whitelist check there.

literally1984 commented 10 months ago

I'm sure I could do that, but it seems messy and an event would be much cleaner.

iamnoksio commented 10 months ago

I'm sure I could do that, but it seems messy and an event would be much cleaner.

DUDE you buggin w your damn event, create it, put it in place and do a pull request

iamnoksio commented 10 months ago

What do you need that feature for?

I would like to have the feature to cancel anybody save a few whitelisted players from getting op. I'm already accomplishing this by using a BukkitRunnable and checking the op list every few seconds, but I feel as though an actual event would be better.

PlayerPreLoginEvent or some like that should be fine for what you've described