Commit Graph

169 Commits

Author SHA1 Message Date
Teriuihi fc7860145f Updated to 1.21 by switching to cosmos 2025-06-21 00:53:55 +02:00
Teriuihi 1dd19f0543 Update dependencies and build configuration 2025-06-20 23:26:54 +02:00
Teriuihi cb0bda8d5b Prevent sending mail to ignored players.
Added a check to block users from sending mail to players who have ignored them. A message is displayed to inform the sender, ensuring clearer communication and respecting player preferences.
2025-03-21 22:56:10 +01:00
Teriuihi 5212954946 Refactor config reload and server name handling.
Replaced inconsistent `ReloadConfig` usage with `reloadConfig` across the codebase for better naming consistency. Introduced `ServerName` utility to standardize server name retrieval and improve maintainability. Added logging enhancements for better debugging of muted users and blocked messages.
2025-03-21 22:55:57 +01:00
Teriuihi f1b8af6136 Merge branch 'ignore_fix' 2025-03-21 20:35:06 +01:00
Teriuihi 9e437079e4 Remove Galaxy dependency
Switched back to paper since we don't use any features from Galaxy that aren't already in paper
2025-03-21 20:34:45 +01:00
Len f5c0a0676c Delay unread mail message and also send it as a title message 2025-02-07 20:44:59 +01:00
Stijn 73e67eed6c
Vote mute (#3)
* Implement chat log handler with database support

The code changes introduce the ability to log chat messages. A new ChatLogHandler class has been added that manages the queue of chat log messages, both storing them in memory and writing them to a database. New columns have been added to the database and the interactivity with the database is handled using prepared statements to improve security and performance. The chat messages are deleted from the database after a certain period, which can be configured.

* Add start of VoteToMute functionality in chat system

Implemented VoteToMute system enabling initiated voting for muting a player in chat. This includes creating new classes "ActiveVoteToMute", "VoteToMute", and "VoteToMuteStarter". The "VoteToMute" class handles the voting command logic, it allows players to vote on whether to mute other players. The code also adds a call to register this new command in the main VelocityChat class.

* Replace Object2ObjectOpenHashMap with HashMap

The usage of Object2ObjectOpenHashMap in storing chat logs and the chat log handler was switched to HashMap. This was done to ensure the plugin can be run on proxy as velocity does not include this library

* Add VoteToMuteHelper and enhance ActiveVoteToMute

Implemented a new module titled VoteToMuteHelper to enhance the voting system and augment the user experience. This module enhances the system by providing relevant player suggestions and setting up the mute player. Made updates to the ActiveVoteToMute module to handle potential voters and mute the player if the vote is passed. VoteToMute module is also updated to include the total eligible players. The code is made robust by adding appropriate error checks.

* Enable optional logging in ChatLogHandler

Modified the ChatLogHandler to support optional logging by introducing a new argument in the getInstance() method. This argument sets the logging state during instantiation. This facilitates better flexibility when using the ChatLogHandler across different sections of the code base as logging requirements may differ.

* Add mute vote results sent to Discord and staff presence check

Enhanced the vote-to-mute feature by adding a function that sends the mute vote results to a general channel on Discord. A 'staff presence' check has also been added which prevents the mute vote from being initiated if a staff member is online, instead, it prompts users to directly contact a staff member for help.

* Fix chat log message deletion query

Corrected the SQL query in the `deleteOldMessages` method within `ChatLogQueries.java`. Originally, it was incorrectly deleting newer messages rather than older ones due to an incorrect comparison symbol. It has now been adjusted to properly delete older messages based on the provided duration.

* Add player muted logging and abstract embed building

The update introduces a log entry indicating when a player has been muted due to voting. The embed creation for this process has been isolated and extracted into a separate function. This contributes to better code modularity and organization.

* Implement logging for ChatLogHandler

The ChatLogHandler now includes logging for better troubleshooting and understanding of the server state. Logging triggers when chat logging is disabled, when it starts, and also if there's a failure in saving chat messages to the database.

* Refactor death message display in PlayerListener

The commit refactors the method for displaying player death messages in the PlayerListener class. Specifically, it adds functionality to replace usernames with display names in death notifications. More descriptive death messages with themed colors and icons are now shown.

* Refine ChatPlugin and improve "vote to mute" logic

Modified ChatPlugin to include "thisPlugin" within the ShutdownListener initialization. Additionally, adjusted the mute vote failure message color from green to red in ActiveVoteToMute file and added a condition to return false if there are no votes. Also, made improvements to the pagination logic in the VoteToMuteStarter file. Lastly, improved the chat logging mechanics in ChatLogHandler by adding and refining various log information for capturing action details.

* Update vote validation and argument naming

Updated the method "votePassed" in "ActiveVoteToMute" to consider a scenario where no votes have been made for muting. Also, corrected the argument name from "yesno" to "yesNo" in "VoteToMuteHelper" to match with its name in the command constructor

* Update vote to mute functionality in chat system

Several changes were made to update the vote to mute functionality in the chat system. The threshold for eligible players online for vote has been changed from 10 to 6. In addition, improvements have been made to prevent the vote from ending prematurely. Lastly, feedback messages to users when they cast their vote and an update to the vote start message format have been implemented.

* Update vote-to-mute feature

The vote-to-mute feature is updated to include information about the vote initiating player. Also, the duration to retrieve chat logs increased from 5 minutes to 10 minutes. Lastly, eligible players are now notified live about the voting progress.

* Fix message validation and chat log order

Corrected conditional logic in VoteToMuteHelper to validate messages properly and adjusted sorting of chat logs in VoteToMuteStarter to display in reverse chronological order. The update now accurately verifies the existence of selected messages and presents recent logs first for more user-friendly navigation.
2024-07-27 23:16:18 +02:00
Len 71a8c652dc Update to 1.21 2024-07-21 18:57:58 +02:00
Len 13e4966a12 Revert "Update to 1.21?"
This reverts commit 3ea078237d.
2024-07-19 21:09:26 +02:00
Len 3ea078237d Update to 1.21? 2024-07-06 11:00:58 +02:00
Teriuihi 034de90062 Implement evidence for automatic ban for 'punish' filter violations
When a user who violate the 'punish' filter rules is automatically banned, there will now be a post about it in the #evidence channel.
2024-03-02 20:41:59 +01:00
Teriuihi bd8fa02f1e Add 'punish' filter and automatic banning functionality
Extended the RegexManager filterText method to include a 'punish' case that triggers an automatic ban for users who violate the filter. This commit also updates the PluginMessageListener to handle 'punish' commands, thus completing the execution of an auto-ban function.
2024-03-02 19:18:13 +01:00
Len f63c4c0836 Update velocity 2023-12-17 12:39:07 +01:00
Teriuihi c02e4dd884 Log all party messages 2023-07-10 23:15:08 +02:00
Teriuihi 5583abbbca Fix party info not showing if party owner is null 2023-06-20 23:44:32 +02:00
Len 3aa0b09133 Fix ChatFilter.java not applying to message. 2022-10-08 11:05:56 +02:00
Len 8baa254d5e Revert "Fix replacement filers not working."
This reverts commit df4ff7f6b3.
2022-10-03 11:29:06 +02:00
Len a4e4982dc3 Update nicknames to use Chat's plugin message channels. 2022-10-01 20:42:35 +02:00
Len df4ff7f6b3 Fix replacement filers not working. 2022-10-01 13:32:04 +02:00
Len 2764446e41 Switch to new formatting permissions. 2022-09-30 16:48:08 +02:00
Len 6329eacd07 Fix some deprecated issues 2022-09-29 16:26:55 +02:00
Len 99cbc01106 Update buildscript 2022-09-29 16:26:55 +02:00
Len 58b80e9eaf Fork NickNameAccepted to update nickname on proxy before forwarding. 2022-09-29 16:26:55 +02:00
Len 11ecf1ad16 Merge Nicknames 2022-09-27 00:02:27 +02:00
Len 643fb5a633 Fix mail output message not showing recipient name. 2022-09-26 19:08:51 +02:00
Len 425c06af33 Update build scripts 2022-09-26 19:08:51 +02:00
Stijn d3be713c9a Added optional sender argument to /mail list <username> 2022-09-21 18:26:16 +02:00
Len 6e41a81ed1 Do not shade minimessage in velocity module 2022-09-19 18:27:19 +02:00
Stijn ce1ec164ef added confirmation message to mail send 2022-09-19 18:10:15 +02:00
Teriuihi 32e38ef32b spot the bug 2022-06-02 04:57:04 +02:00
Teriuihi b1f2370bec Added continue, fixed mail 2022-06-02 03:48:51 +02:00
Teriuihi 20c7f0a6d9 ez tmp fix for sendername receivername not being replaced properly 2022-05-30 23:59:54 +02:00
Teriuihi 40a6e6bcc9 Fixed colors not working in chat 2022-05-30 22:10:54 +02:00
Teriuihi 679602c1f7 Registered SilentJoinCommand 2022-05-30 19:19:41 +02:00
Len 8c3d03383d build using velocity 3.1.2-SNAPSHOT 2022-05-30 18:47:29 +02:00
Len c836452d19 Update minimessage references 2022-05-27 00:31:36 +02:00
Teriuihi fdd9d81400 Fix party users not being removed correctly (they left the party but still had their party id set) 2022-05-24 02:49:36 +02:00
Stijn 408d38fb78 Added silent join 2022-05-23 22:32:43 +02:00
Stijn faa0435131 Require reports to be at least 3 words long 2022-05-23 22:06:17 +02:00
Stijn 1946cd4ab7 Added online indicators for party info 2022-05-23 21:55:36 +02:00
Teriuihi 0a6dfe799e Properly handle filtered messages in party chat 2022-03-15 00:20:07 +01:00
destro174 e6dfd19b84 Merge branch 4.9 2022-03-14 16:48:35 +01:00
Teriuihi 98475583a9 Gave report an error message 2022-03-05 04:52:10 +01:00
Teriuihi 09507999aa Added player does not exist message when sending a message to a player that's not online 2022-03-02 17:36:15 +01:00
Teriuihi 7c9b12c394 Don't let someone join a party they are already in 2022-03-02 17:30:19 +01:00
Teriuihi 23e7c57333 Use exceptions for filters, highlight words that were filtered 2022-02-27 18:29:41 +01:00
destro174 5834ff2c97 Why doesn't it error? 2022-02-24 17:16:32 +01:00
destro174 e550679637 Workaround? please build 2022-02-23 16:13:53 +01:00
destro174 439fb12480 Workaround for minimessage 2022-02-23 15:50:21 +01:00