Skip to content

Conversation

@LaxWasHere
Copy link

No description provided.

@Justin42
Copy link

Justin42 commented Apr 9, 2019

Plugins should not take action on MONITOR event priority.

@Justin42
Copy link

Justin42 commented Apr 9, 2019

See https://github.com/MinusKube/SmartInvs/blob/master/src/main/java/fr/minuskube/inv/InventoryManager.java for the correct way to handle GUI events in your own plugins.

@atesin
Copy link
Owner

atesin commented Apr 16, 2019

No description provided.

and why there is a game breaking risk?... how can be exploited?

@Justin42
Copy link

Lots of exploits can occur when plugin developers do not handle their GUI events correctly. This isn't the fault of ClickSort-Lite.

@atesin
Copy link
Owner

atesin commented Apr 16, 2019

clould you please gime some examples of what lots of exploit can occur?... the mechanism on how they can break the game?, how would you do it? ... so i could correct this and my other plugns, or maybe find a deeper cause?

in another hand, if isn't the fault of clicksort-lite, won't be better to do nothing?

thanks in advance for your possible response

@Justin42
Copy link

Well, you've got one person saying you should set it to NORMAL and another saying you should set it to MONITOR. You've done the right thing by setting it at HIGHEST, and it seems you understand the event handling system and priorities.

Lots of exploits can occur, but in all cases it is caused by plugins failing to properly cancel GUI events after handling OR by listening on an unnecessarily high priority. There is nothing for CSL to do in these cases.

You can assist other developers by providing an enhancement. You can fire your own event before sorting and check if that is canceled before actually sorting. However, that doesn't solve any issues in other plugins. In fact, it may make things worse by offering multiple solutions to a simple problem.

@atesin
Copy link
Owner

atesin commented Apr 20, 2019

@Justin42 thanks for your early reply... i find excelent the idea to create a custom event, i will take in mind in the future if i need (in fact now remember i had done in early versions of MyPortals but dropped because added unecessary complexity)

the question are actually directed to @LaxWasHere because i find a little useless his suggestion with any explanation, i think the spirit of collaboration is to learn together instead of give blind advices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants