mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-13 04:36:44 +00:00
![ementalo](/assets/img/avatar_default.png)
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1416 e251c2fe-e539-e718-e476-b85c1f46cddb
35 lines
734 B
Java
35 lines
734 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import org.bukkit.Server;
|
|
import org.bukkit.entity.Player;
|
|
import com.earth2me.essentials.User;
|
|
import com.earth2me.essentials.Util;
|
|
|
|
|
|
public class Commandhelpop extends EssentialsCommand
|
|
{
|
|
public Commandhelpop()
|
|
{
|
|
super("helpop");
|
|
}
|
|
|
|
@Override
|
|
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
|
{
|
|
if (args.length < 1)
|
|
{
|
|
throw new NotEnoughArgumentsException();
|
|
}
|
|
|
|
charge(user);
|
|
for (Player p : server.getOnlinePlayers())
|
|
{
|
|
User u = ess.getUser(p);
|
|
if (!u.isAuthorized("essentials.helpop.receive"))
|
|
{
|
|
continue;
|
|
}
|
|
u.sendMessage(Util.format("helpOp", user.getDisplayName(), getFinalArg(args, 0)));
|
|
}
|
|
}
|
|
}
|