mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-18 22:49:45 +00:00
34 lines
853 B
Java
34 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));
|
||
|
}
|
||
|
}
|
||
|
}
|