Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TownPreUnclaimEvent cancellation message is not sent, user is not informed of failure #6178

Closed
galacticwarrior9 opened this issue Sep 20, 2022 · 2 comments
Labels
Need Feedback Something is required of the submitter. Tickets will be closed after 14 days with no feedback.

Comments

@galacticwarrior9
Copy link
Contributor

galacticwarrior9 commented Sep 20, 2022

What steps will reproduce the problem?

  1. Write a listener for TownPreUnclaimEvent that cancels the event and sets a cancellation message.
  2. Join a town, go to a claimed townblock and type /t unclaim.

You will see the following message, which misleads the player into thinking the townblock was successfully unclaimed:

image

The user is not sent the cancellation message. It is actually sent to the console:

image

What is the expected output?

The user is not told that the townblock was successfully unclaimed. Instead, the cancellation message is sent to them.

Towny version

0.98.3.5

Server version

Paper 1.19.2

@LlmDl
Copy link
Member

LlmDl commented Sep 20, 2022

I took a look into this and the event you're listening to is called from the DatabaseHandler, and is called under many scenarios that don't involve a player.

You probably want to use the TownPreUnclaimCmdEvent which is able to send a cancellation message to the unclaiming player.

@LlmDl LlmDl added Need Feedback Something is required of the submitter. Tickets will be closed after 14 days with no feedback. and removed bug labels Sep 20, 2022
@galacticwarrior9
Copy link
Contributor Author

You're right, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Feedback Something is required of the submitter. Tickets will be closed after 14 days with no feedback.
Projects
None yet
Development

No branches or pull requests

2 participants