aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/commands/CommandUtils.java
blob: cbeaf6c3698f46bd704e6933e21078d6324fc4d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package gtPlusPlus.core.commands;

import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;

public class CommandUtils {

	public EntityPlayer getPlayer(final ICommandSender icommandsender) {
		EntityPlayer player;

		if (icommandsender instanceof EntityPlayer) {
			player = (EntityPlayer) icommandsender;
			return player;
		}
		else {
			return null;
		}
	}

}