Fix missing features and improve code quality
Features fixed: - Added chat filter functionality (block/warn/censor modes) - Fixed spy command to monitor all chat messages - Added proper spy notifications for global/local chat Code quality improvements: - Created PlayerUtil to eliminate code duplication in player lookup - Refactored ChatListener into smaller, focused methods - Added Constants class to replace magic numbers - Improved SOLID principles compliance - Fixed all compilation warnings All features from README are now implemented and working.
This commit is contained in:
parent
4f7b792633
commit
e616667c78
20 changed files with 250 additions and 99 deletions
|
|
@ -19,9 +19,9 @@ public class ClearChatCommand implements CommandExecutor {
|
|||
|
||||
@Override
|
||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
|
||||
// Отправляем 100 пустых строк всем игрокам
|
||||
// Отправляем пустые строки всем игрокам для очистки чата
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
for (int i = 0; i < com.loki.lochat.utils.Constants.CLEAR_CHAT_LINES; i++) {
|
||||
player.sendMessage("");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue