mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-20 15:35:08 +00:00

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1471 e251c2fe-e539-e718-e476-b85c1f46cddb
29 lines
635 B
Java
29 lines
635 B
Java
package com.earth2me.essentials.commands;
|
|
|
|
import org.bukkit.Server;
|
|
import com.earth2me.essentials.User;
|
|
import com.earth2me.essentials.Util;
|
|
|
|
|
|
public class Commandtpdeny extends EssentialsCommand
|
|
{
|
|
public Commandtpdeny()
|
|
{
|
|
super("tpdeny");
|
|
}
|
|
|
|
@Override
|
|
public void run(Server server, User user, String commandLabel, String[] args) throws Exception
|
|
{
|
|
User p = user.getTeleportRequest();
|
|
if (p == null)
|
|
{
|
|
throw new Exception(Util.i18n("noPendingRequest"));
|
|
}
|
|
|
|
user.charge(this);
|
|
user.sendMessage(Util.i18n("requestDenied"));
|
|
p.sendMessage(Util.i18n("requestDenied"));
|
|
user.requestTeleport(null, false);
|
|
}
|
|
}
|