Essentials
Essentials copied to clipboard
Don't call PrivateMessageSentEvent if the message wasn't sent successfully
Don't call PrivateMessageSentEvent if the message wasn't sent successfully
Information
PrivateMessageSentEvent is called even if the message wasn't actually sent (/reply
command).
Details
Proposed fix:
Don't call PrivateMessageSentEvent if the message wasn't sent successfully.
Environments tested:
OS: Windows 10 Home 64-bit (21H2, 19044.1865)
Java version: 18
- [x] Most recent Paper version (1.XX.Y, git-Paper-BUILD)
- [ ] CraftBukkit/Spigot/Paper 1.12.2
- [ ] CraftBukkit 1.8.8
This appears to be intentional behaviour? PrivateMessageSentEvent
includes a status enum for checking whether a message was sent successfully or not. Admittedly the event name isn't completely clear, but we can't change that without breaking API.