Skip to content

Commit

Permalink
Remove new event
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Mar 6, 2024
1 parent 754a53e commit f91a4b9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 52 deletions.
46 changes: 0 additions & 46 deletions src/main/java/io/wdsj/asw/event/ASWChatPassEvent.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientChatCommand;
import com.github.retrooper.packetevents.wrapper.play.client.WrapperPlayClientChatMessage;
import io.wdsj.asw.AdvancedSensitiveWords;
import io.wdsj.asw.event.ASWChatPassEvent;
import io.wdsj.asw.event.ASWFilterEvent;
import io.wdsj.asw.event.EventType;
import io.wdsj.asw.setting.PluginMessages;
Expand Down Expand Up @@ -79,8 +78,6 @@ public void onPacketReceive(PacketReceiveEvent event) {
long endTime = System.currentTimeMillis();
addProcessStatistic(endTime, startTime);
return;
} else if (settingsManager.getProperty(PluginSettings.ENABLE_API)){
getScheduler().runTask(() -> Bukkit.getPluginManager().callEvent(new ASWChatPassEvent(player, originalMessage, false)));
}

// Context check
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.wdsj.asw.listener.packet;

import io.wdsj.asw.AdvancedSensitiveWords;
import io.wdsj.asw.event.ASWChatPassEvent;
import io.wdsj.asw.event.ASWFilterEvent;
import io.wdsj.asw.event.EventType;
import io.wdsj.asw.setting.PluginMessages;
Expand Down Expand Up @@ -75,9 +74,8 @@ public void onPacketReceiving(@NotNull com.comphenix.protocol.events.PacketEvent
long endTime = System.currentTimeMillis();
addProcessStatistic(endTime, startTime);
return;
} else if (settingsManager.getProperty(PluginSettings.ENABLE_API)) {
getScheduler().runTask(() -> Bukkit.getPluginManager().callEvent(new ASWChatPassEvent(player, message, false)));
}

// Context check
if (settingsManager.getProperty(PluginSettings.CHAT_CONTEXT_CHECK) && isNotCommand(message)) {
ChatContext.addMessage(player, message);
Expand Down

0 comments on commit f91a4b9

Please sign in to comment.