mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-07-07 04:55:10 +00:00
![snowleo](/assets/img/avatar_default.png)
Prevent that moving players triggers unafk too early, they can now move within a radius of 3 blocks from the position where they went afk.
39 lines
802 B
Java
39 lines
802 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import org.bukkit.Server;
|
|
import com.earth2me.essentials.User;
|
|
import com.earth2me.essentials.Util;
|
|
|
|
|
|
public class Commandme extends EssentialsCommand
|
|
{
|
|
public Commandme()
|
|
{
|
|
super("me");
|
|
}
|
|
|
|
@Override
|
|
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
|
{
|
|
if (user.isMuted())
|
|
{
|
|
throw new Exception(Util.i18n("voiceSilenced"));
|
|
}
|
|
|
|
if (args.length < 1)
|
|
{
|
|
throw new NotEnoughArgumentsException();
|
|
}
|
|
final StringBuilder message = new StringBuilder();
|
|
message.append("* ");
|
|
message.append(user.getDisplayName());
|
|
message.append(' ');
|
|
for (int i = 0; i < args.length; i++)
|
|
{
|
|
message.append(args[i]);
|
|
message.append(' ');
|
|
}
|
|
ess.broadcastMessage(user, message.toString());
|
|
}
|
|
}
|