summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandtppos.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtppos.java18
1 files changed, 6 insertions, 12 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
index 75910cd85..80daf2b16 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtppos.java
@@ -1,23 +1,17 @@
package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
-import com.earth2me.essentials.Trade;
-import com.earth2me.essentials.User;
+import com.earth2me.essentials.economy.Trade;
+import com.earth2me.essentials.api.IUser;
import org.bukkit.Location;
-import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
public class Commandtppos extends EssentialsCommand
{
- public Commandtppos()
- {
- super("tppos");
- }
-
@Override
- public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
+ public void run(final IUser user, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 3)
{
@@ -36,7 +30,7 @@ public class Commandtppos extends EssentialsCommand
{
location.setPitch(Float.parseFloat(args[4]));
}
- final Trade charge = new Trade(this.getName(), ess);
+ final Trade charge = new Trade(commandName, ess);
charge.isAffordableFor(user);
user.sendMessage(_("teleporting"));
user.getTeleport().teleport(location, charge, TeleportCause.COMMAND);
@@ -44,14 +38,14 @@ public class Commandtppos extends EssentialsCommand
}
@Override
- public void run(final Server server, final CommandSender sender, final String commandLabel, final String[] args) throws Exception
+ public void run(final CommandSender sender, final String commandLabel, final String[] args) throws Exception
{
if (args.length < 4)
{
throw new NotEnoughArgumentsException();
}
- User user = ess.getUser(server.getPlayer(args[0]));
+ IUser user = ess.getUser(server.getPlayer(args[0]));
final int x = Integer.parseInt(args[1]);
final int y = Integer.parseInt(args[2]);
final int z = Integer.parseInt(args[3]);