<commit_before>package me.noraaron1.Greport;

import java.io.IOException;

import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

@SuppressWarnings("static-access")
public class GreportCommands extends JavaPlugin
  implements Listener
{
  GPConfig ch = new GPConfig(this);
  LangFile l = new LangFile(this);

  public void onEnable() { PluginManager pm = getServer().getPluginManager();
    pm.registerEvents(this, this);
    try { saveConfig(); setupConfig(getConfig()); saveConfig(); } catch (Exception e) { e.printStackTrace(); }
    try {
      ch.createBugReportFile();
      LangFile.unpackLangFile();
    } catch (IOException e) {
      System.out.println("[Greport] ERROR - Creating Base Report File");
    } }

  public boolean onCommand(CommandSender sender, Command cmd, String args, String[] args)
  {
    Player player = (Player)sender;
    if (cmd.getName().equalsIgnoreCase("greport")) {
      if (args.length == 0) {
        sender.sendMessage(ChatColor.RED + "Usage: /greport <msg>");
      }
      if (args.length > 1) {
          for (Player p : Bukkit.getOnlinePlayers()) {
            String message = StringUtils.join(args, ' ', 1, args.length);
            try {
              ch.fileReport(player, ChatColor.RED + "[GREPORT] " + ChatColor.WHITE + message.toString());
            } catch (IOException e) {
              System.out.println("[Greport] ERROR - Creating Bug Report");
            }
            if (p.isOp()) {
              p.sendMessage(ChatColor.BLUE + "[Greport]" + ChatColor.AQUA + LangFile.ln4);
          }
        }
        }
    }
    if (cmd.getName().equalsIgnoreCase("glist")) {
      if (player.hasPermission("glist.command")){
        ch.listUnreadReports(player);<commit_msg>Update GreportCommands.java<commit_after>package me.noraaron1.Greport;

import java.io.IOException;

import org.apache.commons.lang.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerLoginEvent;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

@SuppressWarnings("static-access")
public class GreportCommands extends JavaPlugin
  implements Listener
{
  GPConfig ch = new GPConfig(this);
  LangFile l = new LangFile(this);

  public void onEnable() { PluginManager pm = getServer().getPluginManager();
    pm.registerEvents(this, this);
    try { saveConfig(); setupConfig(getConfig()); saveConfig(); } catch (Exception e) { e.printStackTrace(); }
    try {
      ch.createBugReportFile();
      LangFile.unpackLangFile();
    } catch (IOException e) {
      System.out.println("[Greport] ERROR - Creating Base Report File");
    } }

  public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  {
    Player player = (Player)sender;
    if (cmd.getName().equalsIgnoreCase("greport")) {
      if (args.length == 0) {
        sender.sendMessage(ChatColor.RED + "Usage: /greport <msg>");
      }
      if (args.length > 1) {
          for (Player p : Bukkit.getOnlinePlayers()) {
            String message = StringUtils.join(args, ' ', 1, args.length);
            try {
              ch.fileReport(player, ChatColor.RED + "[GREPORT] " + ChatColor.WHITE + message.toString());
            } catch (IOException e) {
              System.out.println("[Greport] ERROR - Creating Bug Report");
            }
            if (p.isOp()) {
              p.sendMessage(ChatColor.BLUE + "[Greport]" + ChatColor.AQUA + LangFile.ln4);
          }
        }
        }
    }
    if (cmd.getName().equalsIgnoreCase("glist")) {
      if (player.hasPermission("glist.command")){
        ch.listUnreadReports(player);
{'fraction_non_alphanumeric': 0.1311437223386909, 'fraction_numerical': 0.0023293733985557887, 'mean_word_length': 3.2472799208704255, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3952002', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1276, 'n_words': 262}