
Suggestion: Add a way to change/disable "Sorry, this event was cancelled." message
TomyG27 opened this issue ยท 5 comments
Please explain your feature request to the best of your abilities:
I am using Towny and Skript with Skript-Towny add-on and when I cancel an event it sends "Sorry, this event was cancelled." The problem is that I wanted to change or disable that message but I can't find a way in the language file.
I suggest that you add a way to change or disable that message if that is possible.
Every CancellableTownyEvent has a setCancelMessage(String msg)
method on it. You can use that to change your message.
I don't know how skript is used but I would assume if you can get an event you can also modify the event. If you cannot do that with skript, consider learning java.
I don't know how skript is used but I would assume if you can get an event you can also modify the event. If you cannot do that with skript, consider learning java.
I don't think the Skript add-on I use for towny has that functionality.
But would it not be possible to add a way on the language files to change that message?
/**
* A class extended by Towny Events which are Cancellable and which contain a
* cancelMessage.
* <p>
* Having a getCancelMessage() available to us allows us to throw a
* {@link CancelledEventException} which can use the cancelMessage in feedback
* messaging or logging.
* <p>
* Used primarily in the
* {@link ConfirmationBuilder#setCancellableEvent(CancellableTownyEvent)} and
* {@link BukkitTools#ifCancelledThenThrow(CancellableTownyEvent)} code.
*
* @author LlmDL
* @since 0.98.4.0.
*/
public abstract class CancellableTownyEvent extends Event implements Cancellable {
private boolean isCancelled = false;
private String cancelMessage = "Sorry, this event was cancelled.";
It is not a translatable message so it is not translated, if that makes sense.