<commit_before>package fr.noogotte.useful_commands.command;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;

import fr.aumgn.bukkitutils.command.Command;
import fr.aumgn.bukkitutils.command.CommandArgs;
import fr.aumgn.bukkitutils.command.NestedCommands;
import fr.aumgn.bukkitutils.command.exception.CommandUsageError;

@NestedCommands(name = "useful")
public class WorldCommands extends UsefulCommands {

    @Command(name = "seed", min = 0, max = 1)
    public void seed(Player player, CommandArgs args) {
        World world = args.getWorld(0, player.getWorld());

        player.sendMessage(ChatColor.GREEN + "Seed : "
                + ChatColor.BLUE + world.getSeed());
    }

    @Command(name = "setspawn", min = 0, max = 0)
    public void setSpawn(Player player, CommandArgs args) {
        Location playerloc = player.getLocation();
        player.getWorld().setSpawnLocation(
                playerloc.getBlockX(),
                playerloc.getBlockY(),
                playerloc.getBlockZ());
        player.sendMessage(ChatColor.GREEN + "Vous avez mis le spawn !");
    }

    @Command(name = "time", min = 1, max = 2)
    public void time(Player player, CommandArgs args) {
        String arg = args.get(0);
        World world = args.getWorld(1, player.getWorld());

        if (arg.equalsIgnoreCase("day")) {
            world.setTime(20 * 60);
            player.sendMessage(ChatColor.GOLD
                    + "Vous avez mis le jour dans "
                    + ChatColor.AQUA + player.getWorld().getName());
        } else if (arg.equalsIgnoreCase("night")) {
            world.setTime(20 * 60 * 11);
            player.sendMessage(ChatColor.GOLD
                    +"Vous avez mis la nuit dans "
                    + ChatColor.AQUA + player.getWorld().getName());
        } else {
            throw new CommandUsageError(
                    "Argument " + arg + " inconnu.");
        }
    }

    @Command(name = "weather", min = 1, max = 2)
    public void weather(Player player, CommandArgs args) {
        String arg = args.get(0);
        World world = args.getWorld(1, player.getWorld());

        if (arg.equalsIgnoreCase("sun")) {
            world.setStorm(false);
            player.sendMessage(ChatColor.GOLD
                    + "Vous avez mis le soleil dans "
                    + ChatColor.AQUA + player.getWorld().getName());
        } else if(arg.equalsIgnoreCase("storm")) {
            world.setStorm(true);
            player.sendMessage(ChatColor.GOLD
                    + "Vous avez mis la pluie dans "
                    + ChatColor.AQUA + player.getWorld().getName());
        } else {
            throw new CommandUsageError(
                    "Argument " + arg + " inconnu.");
        }
    }
}
<commit_msg>fix message for /time and /weather command<commit_after>package fr.noogotte.useful_commands.command;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.entity.Player;

import fr.aumgn.bukkitutils.command.Command;
import fr.aumgn.bukkitutils.command.CommandArgs;
import fr.aumgn.bukkitutils.command.NestedCommands;
import fr.aumgn.bukkitutils.command.exception.CommandUsageError;

@NestedCommands(name = "useful")
public class WorldCommands extends UsefulCommands {

    @Command(name = "seed", min = 0, max = 1)
    public void seed(Player player, CommandArgs args) {
        World world = args.getWorld(0, player.getWorld());

        player.sendMessage(ChatColor.GREEN + "Seed : "
                + ChatColor.BLUE + world.getSeed());
    }

    @Command(name = "setspawn", min = 0, max = 0)
    public void setSpawn(Player player, CommandArgs args) {
        Location playerloc = player.getLocation();
        player.getWorld().setSpawnLocation(
                playerloc.getBlockX(),
                playerloc.getBlockY(),
                playerloc.getBlockZ());
        player.sendMessage(ChatColor.GREEN + "Vous avez mis le spawn !");
    }

    @Command(name = "time", min = 1, max = 2)
    public void time(Player player, CommandArgs args) {
        String arg = args.get(0);
        World world = args.getWorld(1, player.getWorld());

        if (arg.equalsIgnoreCase("day")) {
            world.setTime(20 * 60);
            player.sendMessage(ChatColor.GOLD
                    + "Vous avez mis le jour dans "
                    + ChatColor.AQUA + world.getName());
        } else if (arg.equalsIgnoreCase("night")) {
            world.setTime(20 * 60 * 11);                
            player.sendMessage(ChatColor.GOLD
                    +"Vous avez mis la nuit dans "
                    + ChatColor.AQUA + world.getName());
        } else {
            throw new CommandUsageError(
                    "Argument " + arg + " inconnu.");
        }
    }

    @Command(name = "weather", min = 1, max = 2)
    public void weather(Player player, CommandArgs args) {
        String arg = args.get(0);
        World world = args.getWorld(1, player.getWorld());

        if (arg.equalsIgnoreCase("sun")) {
            world.setStorm(false);
            player.sendMessage(ChatColor.GOLD
                    + "Vous avez mis le soleil dans "
                    + ChatColor.AQUA + world.getName());
        } else if(arg.equalsIgnoreCase("storm")) {
            world.setStorm(true);
            player.sendMessage(ChatColor.GOLD
                    + "Vous avez mis la pluie dans "
                    + ChatColor.AQUA + world.getName());
        } else {
            throw new CommandUsageError(
                    "Argument " + arg + " inconnu.");
        }
    }
}

{'fraction_non_alphanumeric': 0.11537799207852592, 'fraction_numerical': 0.007921474083003272, 'mean_word_length': 1.9318525996971228, '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': '5326250', 'n_tokens_mistral': 1761, 'n_tokens_neox': 1646, 'n_words': 354}