<commit_before>package com.example.examplemod;

import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSign;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntitySign;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;

import java.util.ArrayList;
import java.util.List;

/**
 * This mod is a simple example of how we can use NBT and custom TileEntities on the server to store additional data.
 */
@Mod(modid = ExampleMod.MODID, name = ExampleMod.MODID, version = ExampleMod.VERSION,

        // This mod is not required on the client and is made to be installed only on a dedicated server
        acceptableRemoteVersions = "*")
public class ExampleMod
{
    public static final String MODID = "ExampleMod";
    public static final String VERSION = "1.0";

    /**
     * The key that will be used to store all mod data on item and on the TileEntity
     */
    public static final String TAG_ROOT = MODID+":data";

    /**
     * Register our custom tile entity and register itself on the event bus
     */
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        // The sign on the end isn't required
        GameRegistry.registerTileEntity(TileEntityCustomSign.class, MODID + "Sign");
        MinecraftForge.EVENT_BUS.register(this);
    }

    /**
     * Register the /tool command
     */
    @EventHandler
    public void onServerStarting(FMLServerStartingEvent event)
    {
        /**
         * I made it as an anonymous class for simplicity
         */
        event.registerServerCommand(new CommandBase()
        {
            @Override
            public int getRequiredPermissionLevel()
            {
                // Everybody can use this command
                return 0;
            }

            @Override
            public String getCommandName()
            {<commit_msg>Fix: /tool command requiring OP<commit_after>package com.example.examplemod;

import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSign;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntitySign;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;

import java.util.ArrayList;
import java.util.List;

/**
 * This mod is a simple example of how we can use NBT and custom TileEntities on the server to store additional data.
 */
@Mod(modid = ExampleMod.MODID, name = ExampleMod.MODID, version = ExampleMod.VERSION,

        // This mod is not required on the client and is made to be installed only on a dedicated server
        acceptableRemoteVersions = "*")
public class ExampleMod
{
    public static final String MODID = "ExampleMod";
    public static final String VERSION = "1.0";

    /**
     * The key that will be used to store all mod data on item and on the TileEntity
     */
    public static final String TAG_ROOT = MODID+":data";

    /**
     * Register our custom tile entity and register itself on the event bus
     */
    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        // The sign on the end isn't required
        GameRegistry.registerTileEntity(TileEntityCustomSign.class, MODID + "Sign");
        MinecraftForge.EVENT_BUS.register(this);
    }

    /**
     * Register the /tool command
     */
    @EventHandler
    public void onServerStarting(FMLServerStartingEvent event)
    {
        /**
         * I made it as an anonymous class for simplicity
         */
        event.registerServerCommand(new CommandBase()
        {
            @Override
            public boolean canCommandSenderUseCommand(ICommandSender sender)
            {
                // Everybody can use this command
                return true;
            }

            @Override
            public String getCommandName()
            {
{'fraction_non_alphanumeric': 0.08550724637681159, 'fraction_numerical': 0.0009057971014492754, 'mean_word_length': 3.224177505738332, 'pattern_counts': {'":': 2, '<': 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': '3134044', 'n_tokens_mistral': 1564, 'n_tokens_neox': 1577, 'n_words': 411}