<commit_before>package org.royaldev.royalcommands.rcommands;

import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.royaldev.royalcommands.RUtils;
import org.royaldev.royalcommands.RoyalCommands;

public class CmdFixChunk implements CommandExecutor {

    RoyalCommands plugin;

    public CmdFixChunk(RoyalCommands plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("fixchunk")) {
            if (!plugin.isAuthorized(cs, "rcmds.fixchunk")) {
                RUtils.dispNoPerms(cs);
                return true;
            }
            if (!(cs instanceof Player)) {
                cs.sendMessage(ChatColor.RED + "This command is only available to players!");
                return true;
            }
            Player p = (Player) cs;
            Chunk c = p.getLocation().getChunk();
            boolean worked = p.getWorld().refreshChunk(c.getX(), c.getZ());
            if (worked) cs.sendMessage(ChatColor.BLUE + "The chunk you're standing in has been reloaded!");
            else cs.sendMessage(ChatColor.RED + "The chunk could not be reloaded.");
            return true;
        }
        return false;
    }

}<commit_msg>Fixed: /fc may work better (?)<commit_after>package org.royaldev.royalcommands.rcommands;

import org.bukkit.ChatColor;
import org.bukkit.Chunk;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.royaldev.royalcommands.RUtils;
import org.royaldev.royalcommands.RoyalCommands;

public class CmdFixChunk implements CommandExecutor {

    RoyalCommands plugin;

    public CmdFixChunk(RoyalCommands plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("fixchunk")) {
            if (!plugin.isAuthorized(cs, "rcmds.fixchunk")) {
                RUtils.dispNoPerms(cs);
                return true;
            }
            if (!(cs instanceof Player)) {
                cs.sendMessage(ChatColor.RED + "This command is only available to players!");
                return true;
            }
            Player p = (Player) cs;
            Chunk c = p.getLocation().getChunk();
            boolean worked = p.getWorld().refreshChunk(c.getX(), c.getZ());
            c.unload();
            c.load();
            if (worked) cs.sendMessage(ChatColor.BLUE + "The chunk you're standing in has been reloaded!");
            else cs.sendMessage(ChatColor.RED + "The chunk could not be reloaded.");
            return true;
        }
        return false;
    }

}
{'fraction_non_alphanumeric': 0.10795262267343486, 'fraction_numerical': 0.0, 'mean_word_length': 2.4982248520710058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3831706', 'n_tokens_mistral': 852, 'n_tokens_neox': 820, 'n_words': 201}