Created
May 26, 2019 19:08
-
-
Save AzureDoom/9c629d7b1a6aba7b6d9b5d8bff8a6cfd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GiveExp extends CommandBase { | |
@Override | |
public String getName() { | |
return "givexp"; | |
} | |
@Override | |
public String getUsage(ICommandSender sender) { | |
return "/givexp (player) (exp)"; | |
} | |
@Override | |
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { | |
int exp = Integer.valueOf(args[0]); | |
EntityPlayer player = getPlayer(server, sender, args[0]); | |
try { | |
Load.Unit(player).GiveExp(player, exp); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment