Add in messages for when a player specified in the command arguments does not exist on the server currently
This commit is contained in:
parent
08553d57a8
commit
100d2e7208
2 changed files with 10 additions and 0 deletions
|
@ -6,6 +6,7 @@ import com.pahimar.ee3.reference.Names;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import net.minecraft.command.CommandBase;
|
import net.minecraft.command.CommandBase;
|
||||||
import net.minecraft.command.ICommandSender;
|
import net.minecraft.command.ICommandSender;
|
||||||
|
import net.minecraft.command.WrongUsageException;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -42,6 +43,10 @@ public class CommandPlayerForgetEverything extends CommandBase
|
||||||
TransmutationKnowledgeRegistry.getInstance().makePlayerForgetEverything(entityPlayer);
|
TransmutationKnowledgeRegistry.getInstance().makePlayerForgetEverything(entityPlayer);
|
||||||
func_152373_a(commandSender, this, Messages.Commands.PLAYER_FORGET_EVERYTHING_SUCCESS, new Object[]{commandSender.getCommandSenderName(), entityPlayer.getCommandSenderName()});
|
func_152373_a(commandSender, this, Messages.Commands.PLAYER_FORGET_EVERYTHING_SUCCESS, new Object[]{commandSender.getCommandSenderName(), entityPlayer.getCommandSenderName()});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new WrongUsageException(Messages.Commands.PLAYER_NOT_FOUND_ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.pahimar.ee3.reference.Names;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
import net.minecraft.command.CommandBase;
|
import net.minecraft.command.CommandBase;
|
||||||
import net.minecraft.command.ICommandSender;
|
import net.minecraft.command.ICommandSender;
|
||||||
|
import net.minecraft.command.WrongUsageException;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -42,6 +43,10 @@ public class CommandPlayerLearnEverything extends CommandBase
|
||||||
TransmutationKnowledgeRegistry.getInstance().teachPlayerEverything(entityPlayer);
|
TransmutationKnowledgeRegistry.getInstance().teachPlayerEverything(entityPlayer);
|
||||||
func_152373_a(commandSender, this, Messages.Commands.PLAYER_LEARN_EVERYTHING_SUCCESS, new Object[]{commandSender.getCommandSenderName(), entityPlayer.getCommandSenderName()});
|
func_152373_a(commandSender, this, Messages.Commands.PLAYER_LEARN_EVERYTHING_SUCCESS, new Object[]{commandSender.getCommandSenderName(), entityPlayer.getCommandSenderName()});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new WrongUsageException(Messages.Commands.PLAYER_NOT_FOUND_ERROR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue