mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 20:29:20 +00:00
29 lines
893 B
Java
29 lines
893 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import com.earth2me.essentials.CommandSource;
|
|
import com.earth2me.essentials.User;
|
|
import org.bukkit.Server;
|
|
|
|
import static com.earth2me.essentials.I18n.tl;
|
|
|
|
|
|
public class Commandburn extends EssentialsCommand {
|
|
public Commandburn() {
|
|
super("burn");
|
|
}
|
|
|
|
@Override
|
|
protected void run(final Server server, final CommandSource sender, final String commandLabel, final String[] args) throws Exception {
|
|
if (args.length < 2) {
|
|
throw new NotEnoughArgumentsException();
|
|
}
|
|
|
|
if (args[0].trim().length() < 2) {
|
|
throw new NotEnoughArgumentsException();
|
|
}
|
|
|
|
User user = getPlayer(server, sender, args, 0);
|
|
user.getBase().setFireTicks(Integer.parseInt(args[1]) * 20);
|
|
sender.sendMessage(tl("burnMsg", user.getDisplayName(), Integer.parseInt(args[1])));
|
|
}
|
|
}
|