mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-22 08:25:12 +00:00

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@969 e251c2fe-e539-e718-e476-b85c1f46cddb
33 lines
853 B
Java
33 lines
853 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import org.bukkit.Server;
|
|
import com.earth2me.essentials.Essentials;
|
|
import org.bukkit.entity.Player;
|
|
import com.earth2me.essentials.User;
|
|
|
|
|
|
public class Commandhelpop extends EssentialsCommand
|
|
{
|
|
public Commandhelpop()
|
|
{
|
|
super("helpop");
|
|
}
|
|
|
|
@Override
|
|
public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception
|
|
{
|
|
if (args.length < 1)
|
|
{
|
|
user.sendMessage("§cTo request help from an op, type §f/" + commandLabel+ "§c, followed by your question.");
|
|
return;
|
|
}
|
|
|
|
user.charge(this);
|
|
for (Player p : server.getOnlinePlayers())
|
|
{
|
|
User u = User.get(p);
|
|
if (!u.isOp() && !u.isAuthorized("essentials.helpop.receive")) continue;
|
|
u.sendMessage("§c[HelpOp]§f §7" + user.getDisplayName() + ":§f " + getFinalArg(args, 0));
|
|
}
|
|
}
|
|
}
|