Close #18 - Added option to charge per use of /back command

This commit is contained in:
BuildTools committed 2021-03-12 14:37:44 +00:00
1 parent 4f7b4a7e18
commit da30aa9076
11 files changed
+62 -9

No files matched your search

@@ -1,7 +1,9 @@
package me.william278.huskhomes2.commands;
import me.william278.huskhomes2.HuskHomes;
import me.william278.huskhomes2.MessageManager;
import me.william278.huskhomes2.data.DataManager;
import me.william278.huskhomes2.integrations.VaultIntegration;
import me.william278.huskhomes2.teleport.TeleportManager;
import me.william278.huskhomes2.teleport.points.TeleportationPoint;
import org.bukkit.command.Command;
@@ -11,11 +13,6 @@ public class BackCommand extends CommandBase {
@Override
protected void onCommand(Player p, Command command, String label, String[] args) {
TeleportationPoint lastPosition = DataManager.getPlayerLastPosition(p);
if (lastPosition != null) {
TeleportManager.queueTimedTeleport(p, lastPosition);
} else {
MessageManager.sendMessage(p, "error_no_last_position");
}
TeleportManager.queueBackTeleport(p);
}
}