mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 20:29:20 +00:00
27 lines
637 B
Java
27 lines
637 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import static com.earth2me.essentials.I18n.tl;
|
|
import com.earth2me.essentials.User;
|
|
import org.bukkit.Server;
|
|
|
|
|
|
public class Commandpowertooltoggle extends EssentialsCommand
|
|
{
|
|
public Commandpowertooltoggle()
|
|
{
|
|
super("powertooltoggle");
|
|
}
|
|
|
|
@Override
|
|
protected void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
|
{
|
|
if (!user.hasPowerTools())
|
|
{
|
|
user.sendMessage(tl("noPowerTools"));
|
|
return;
|
|
}
|
|
user.sendMessage(user.togglePowerToolsEnabled()
|
|
? tl("powerToolsEnabled")
|
|
: tl("powerToolsDisabled"));
|
|
}
|
|
}
|