Why does it break
This commit is contained in:
@@ -148,15 +148,16 @@ public final class Sentinel extends JavaPlugin {
|
||||
// Scheduled timers
|
||||
Bukkit.getScheduler().runTaskTimer(this, AntiSpam::decayHeat,0, 20);
|
||||
Bukkit.getScheduler().runTaskTimer(this, ProfanityFilter::decayScore,0,1200);
|
||||
log.info("Finished!\n" +
|
||||
" ____ __ ___ \n" +
|
||||
"/\\ _`\\ /\\ \\__ __ /\\_ \\ \n" +
|
||||
"\\ \\,\\L\\_\\ __ ___\\ \\ ,_\\/\\_\\ ___ __\\//\\ \\ \n" +
|
||||
" \\/_\\__ \\ /'__`\\/' _ `\\ \\ \\/\\/\\ \\ /' _ `\\ /'__`\\\\ \\ \\ \n" +
|
||||
" /\\ \\L\\ \\/\\ __//\\ \\/\\ \\ \\ \\_\\ \\ \\/\\ \\/\\ \\/\\ __/ \\_\\ \\_ \n" +
|
||||
" \\ `\\____\\ \\____\\ \\_\\ \\_\\ \\__\\\\ \\_\\ \\_\\ \\_\\ \\____\\/\\____\\\n" +
|
||||
" \\/_____/\\/____/\\/_/\\/_/\\/__/ \\/_/\\/_/\\/_/\\/____/\\/____/\n" +
|
||||
" ]====---- Advanced Anti-Grief & Chat Filter ----====[");
|
||||
log.info("""
|
||||
Finished!
|
||||
____ __ ___ \s
|
||||
/\\ _`\\ /\\ \\__ __ /\\_ \\ \s
|
||||
\\ \\,\\L\\_\\ __ ___\\ \\ ,_\\/\\_\\ ___ __\\//\\ \\ \s
|
||||
\\/_\\__ \\ /'__`\\/' _ `\\ \\ \\/\\/\\ \\ /' _ `\\ /'__`\\\\ \\ \\ \s
|
||||
/\\ \\L\\ \\/\\ __//\\ \\/\\ \\ \\ \\_\\ \\ \\/\\ \\/\\ \\/\\ __/ \\_\\ \\_\s
|
||||
\\ `\\____\\ \\____\\ \\_\\ \\_\\ \\__\\\\ \\_\\ \\_\\ \\_\\ \\____\\/\\____\\
|
||||
\\/_____/\\/____/\\/_/\\/_/\\/__/ \\/_/\\/_/\\/_/\\/____/\\/____/
|
||||
]====---- Advanced Anti-Grief & Chat Filter ----====[""");
|
||||
}
|
||||
|
||||
public void loadConfig() {
|
||||
@@ -238,7 +239,7 @@ public final class Sentinel extends JavaPlugin {
|
||||
command = command.substring(1);
|
||||
}
|
||||
for (String blocked : Sentinel.mainConfig.plugin.dangerous) {
|
||||
if (command.contains(blocked)) return true;
|
||||
if (command.startsWith(blocked)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ final
|
||||
String
|
||||
ENCRYPTION_KEY
|
||||
=
|
||||
"If I am reading this and I am not a verified developer for Sentinel AntiNuke, I solely swear that my attempts to de-obfuscate this plugin are purely for rat checking, and have malicious intentions such as cracking, leaking, or ratting this plugin.";
|
||||
"If I am reading this and I am not a verified developer for Sentinel AntiNuke, I solely swear that my attempts to de-obfuscate this plugin are purely for investigation, and have no malicious intentions such as cracking, leaking, or ratting this plugin.";
|
||||
private
|
||||
static
|
||||
final
|
||||
|
||||
@@ -44,6 +44,7 @@ public class LanguageFile implements JsonSerializable<LanguageFile> {
|
||||
put("spam-block-warn", "Do not spam in chat! Please wait before sending another message.");
|
||||
put("spam-mute-warn", "§cYou have been auto-punished for violating the anti-spam repetitively!");
|
||||
put("spam-mute-notification", "§b§n%1$s§7 has been auto-muted by the anti spam! §8(§c%2$s§7/§4%3$s§8)");
|
||||
put("url-warn", "§cDo not send urls in chat!");
|
||||
}};
|
||||
public LanguageFile() {}
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ public class CMDBlockExecute implements CustomListener {
|
||||
|
||||
@EventHandler
|
||||
private void onCommandBlock(ServerCommandEvent e) {
|
||||
if (!Sentinel.mainConfig.plugin.cmdBlockWhitelist) return;
|
||||
if (!(e.getSender() instanceof BlockCommandSender s)) return;
|
||||
Block cmdBlock = s.getBlock();
|
||||
if (CMDBlockWhitelist.canRun(cmdBlock)) return;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class AdvancedBlockers {
|
||||
|
||||
if (matcher.find()) {
|
||||
e.setCancelled(true);
|
||||
e.getPlayer().sendMessage(Text.prefix(Sentinel.language.get("unicode-warn")));
|
||||
e.getPlayer().sendMessage(Text.prefix(Sentinel.language.get("url-warn")));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user