Skip to content

Commit

Permalink
Check the boolean before the perm, and send messages a bit later
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonHorkles committed Aug 6, 2024
1 parent 0a21c39 commit 9443bd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion checksums.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"3.6.0": "0DB6C79664DDAF2D69DBEA6FBE3061C6"
"3.6.0": "E5EC1981958AFE0A3535E3CCAA3A7E07"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ public ChecksumChecker(JavaPlugin plugin) {
public void onJoin(PlayerJoinEvent event) {
String pluginName = plugin.getDescription().getName();

if (event.getPlayer().hasPermission(pluginName.toLowerCase() + ".notify") && checksumDiffers) {
LogDebug debug = new LogDebug();
debug.error("SERVER", msg1);
debug.error("SERVER", msg2);
debug.error("SERVER", msg3 + pluginName);
debug.error("SERVER", msg4);
debug.error("SERVER", msg5);
}
if (checksumDiffers)
if (event.getPlayer().hasPermission(pluginName.toLowerCase() + ".notify")) new BukkitRunnable() {
@Override
public void run() {
LogDebug debug = new LogDebug();
debug.error("SERVER", msg1);
debug.error("SERVER", msg2);
debug.error("SERVER", msg3 + pluginName);
debug.error("SERVER", msg4);
debug.error("SERVER", msg5);
}
}.runTaskLater(plugin, 20L);
}

public void scan(File pluginJar) {
Expand Down

0 comments on commit 9443bd7

Please sign in to comment.