Java Code Examples for net.minecraft.entity.player.EntityPlayer.onKillCommand()

The following are Jave code examples for showing how to use onKillCommand() of the net.minecraft.entity.player.EntityPlayer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: DecompiledMinecraft   File: CommandKill.java   View Source Code Vote up 6 votes
/**
 * Callback when the command is invoked
 */
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
    if (args.length == 0)
    {
        EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
        entityplayer.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entityplayer.getDisplayName()});
    }
    else
    {
        Entity entity = func_175768_b(sender, args[0]);
        entity.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entity.getDisplayName()});
    }
}
 
Example 2
Project: DecompiledMinecraft   File: CommandKill.java   View Source Code Vote up 6 votes
/**
 * Callback when the command is invoked
 */
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
    if (args.length == 0)
    {
        EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
        entityplayer.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entityplayer.getDisplayName()});
    }
    else
    {
        Entity entity = func_175768_b(sender, args[0]);
        entity.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entity.getDisplayName()});
    }
}
 
Example 3
Project: BaseClient   File: CommandKill.java   View Source Code Vote up 6 votes
/**
 * Callback when the command is invoked
 */
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
    if (args.length == 0)
    {
        EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
        entityplayer.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entityplayer.getDisplayName()});
    }
    else
    {
        Entity entity = func_175768_b(sender, args[0]);
        entity.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entity.getDisplayName()});
    }
}
 
Example 4
Project: BaseClient   File: CommandKill.java   View Source Code Vote up 6 votes
/**
 * Callback when the command is invoked
 */
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
    if (args.length == 0)
    {
        EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
        entityplayer.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entityplayer.getDisplayName()});
    }
    else
    {
        Entity entity = func_175768_b(sender, args[0]);
        entity.onKillCommand();
        notifyOperators(sender, this, "commands.kill.successful", new Object[] {entity.getDisplayName()});
    }
}
 
Example 5
Project: Backmemed   File: CommandKill.java   View Source Code Vote up 6 votes
/**
 * Callback for when the command is executed
 */
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
{
    if (args.length == 0)
    {
        EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
        entityplayer.onKillCommand();
        notifyCommandListener(sender, this, "commands.kill.successful", new Object[] {entityplayer.getDisplayName()});
    }
    else
    {
        Entity entity = getEntity(server, sender, args[0]);
        entity.onKillCommand();
        notifyCommandListener(sender, this, "commands.kill.successful", new Object[] {entity.getDisplayName()});
    }
}
 
Example 6
Project: CustomWorldGen   File: CommandKill.java   View Source Code Vote up 6 votes
/**
 * Callback for when the command is executed
 */
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException
{
    if (args.length == 0)
    {
        EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
        entityplayer.onKillCommand();
        notifyCommandListener(sender, this, "commands.kill.successful", new Object[] {entityplayer.getDisplayName()});
    }
    else
    {
        Entity entity = getEntity(server, sender, args[0]);
        entity.onKillCommand();
        notifyCommandListener(sender, this, "commands.kill.successful", new Object[] {entity.getDisplayName()});
    }
}