// Path: src/main/java/src/john01dav/serverforge/api/CommandSender.java
// public class CommandSender {
//     protected ICommandSender forgeSender;
// 
//     public CommandSender(ICommandSender forgeSender){
//         this.forgeSender = forgeSender;
//     }
// 
//     /**
//      * Sends a message to this commandsender
//      * @param message The message to send
//      */
//     public void sendMessage(String message){
//         forgeSender.addChatMessage(new ChatComponentText(message));
//     }
// 
//     /**
//      * Returns the name of the commandsender, "RCon" for a console
//      * @return The name of this commandsender
//      */
//     public String getName(){
//         return forgeSender.getCommandSenderName();
//     }
// 
//     /**
//      * Returns the player that sent this command, or null if it was not a player
//      * @return The player who sent this command
//      */
//     public Player getPlayer(){
//         if(forgeSender instanceof EntityPlayer){
//             EntityPlayer entity = ((EntityPlayer) forgeSender);
//             return Player.get(entity);
//         }else{
//             return null;
//         }
//     }
// 
// }
// 
// Path: src/main/java/src/john01dav/serverforge/api/NativeCommandWrapper.java
// public class NativeCommandWrapper implements ServerForgeCommand{
//     private ICommand command;
// 
//     public NativeCommandWrapper(ICommand command){
//         this.command = command;
//     }
// 
//     @Override
//     public void onCommand(CommandSender sender, String[] args){
//         command.processCommand(sender.forgeSender, args);
//     }
// 
//     public String getName(){
//         return command.getCommandName();
//     }
// 
//     public String getUsage(CommandSender sender){
//         return command.getCommandUsage(sender.forgeSender);
//     }
// 
// }
// 
// Path: src/main/java/src/john01dav/serverforge/api/ServerForgeCommand.java
// public interface ServerForgeCommand {
// 
//     /**
//      * Called when a command is executed
//      * @param sender An object representing the player, console, or command block that sent the command
//      * @param args The arguments of the command
//      */
//     public void onCommand(CommandSender sender, String[] args);
// 
// }
// 
// Path: src/main/java/src/john01dav/serverforge/events/CancellableEvent.java
// public interface CancellableEvent {
// 
//     public void setCancelled(boolean cancelled);
//     public boolean getCancelled();
// 
// }


import net.minecraftforge.event.CommandEvent;
import src.john01dav.serverforge.api.CommandSender;
import src.john01dav.serverforge.api.NativeCommandWrapper;
import src.john01dav.serverforge.api.ServerForgeCommand;
import src.john01dav.serverforge.events.CancellableEvent;
package src.john01dav.serverforge.api.events;

public class CommandSendEvent implements CancellableEvent{
    private CommandEvent commandEvent;
    private boolean cancelled = false;

    public CommandSendEvent(CommandEvent commandEvent){
        this.commandEvent = commandEvent;
        setCancelled(commandEvent.isCanceled());
    }

    /**
     * Returns the sender of this command
     * @return The sender of this command
     */
// Path: src/main/java/src/john01dav/serverforge/api/CommandSender.java
// public class CommandSender {
//     protected ICommandSender forgeSender;
// 
//     public CommandSender(ICommandSender forgeSender){
//         this.forgeSender = forgeSender;
//     }
// 
//     /**
//      * Sends a message to this commandsender
//      * @param message The message to send
//      */
//     public void sendMessage(String message){
//         forgeSender.addChatMessage(new ChatComponentText(message));
//     }
// 
//     /**
//      * Returns the name of the commandsender, "RCon" for a console
//      * @return The name of this commandsender
//      */
//     public String getName(){
//         return forgeSender.getCommandSenderName();
//     }
// 
//     /**
//      * Returns the player that sent this command, or null if it was not a player
//      * @return The player who sent this command
//      */
//     public Player getPlayer(){
//         if(forgeSender instanceof EntityPlayer){
//             EntityPlayer entity = ((EntityPlayer) forgeSender);
//             return Player.get(entity);
//         }else{
//             return null;
//         }
//     }
// 
// }
// 
// Path: src/main/java/src/john01dav/serverforge/api/NativeCommandWrapper.java
// public class NativeCommandWrapper implements ServerForgeCommand{
//     private ICommand command;
// 
//     public NativeCommandWrapper(ICommand command){
//         this.command = command;
//     }
// 
//     @Override
//     public void onCommand(CommandSender sender, String[] args){
//         command.processCommand(sender.forgeSender, args);
//     }
// 
//     public String getName(){
//         return command.getCommandName();
//     }
// 
//     public String getUsage(CommandSender sender){
//         return command.getCommandUsage(sender.forgeSender);
//     }
// 
// }
// 
// Path: src/main/java/src/john01dav/serverforge/api/ServerForgeCommand.java
// public interface ServerForgeCommand {
// 
//     /**
//      * Called when a command is executed
//      * @param sender An object representing the player, console, or command block that sent the command
//      * @param args The arguments of the command
//      */
//     public void onCommand(CommandSender sender, String[] args);
// 
// }
// 
// Path: src/main/java/src/john01dav/serverforge/events/CancellableEvent.java
// public interface CancellableEvent {
// 
//     public void setCancelled(boolean cancelled);
//     public boolean getCancelled();
// 
// }


// Path: src/main/java/src/john01dav/serverforge/api/events/CommandSendEvent.java
import net.minecraftforge.event.CommandEvent;
import src.john01dav.serverforge.api.CommandSender;
import src.john01dav.serverforge.api.NativeCommandWrapper;
import src.john01dav.serverforge.api.ServerForgeCommand;
import src.john01dav.serverforge.events.CancellableEvent;

package src.john01dav.serverforge.api.events;

public class CommandSendEvent implements CancellableEvent{
    private CommandEvent commandEvent;
    private boolean cancelled = false;

    public CommandSendEvent(CommandEvent commandEvent){
        this.commandEvent = commandEvent;
        setCancelled(commandEvent.isCanceled());
    }

    /**
     * Returns the sender of this command
     * @return The sender of this command
     */
    public CommandSender getCommandSender(){