Update to 1.19.3, update libzontreck, and start adding cost configs
This commit is contained in:
parent
e146f66e84
commit
d709426061
26 changed files with 161 additions and 79 deletions
|
@ -9,13 +9,19 @@ import dev.zontreck.essentials.Messages;
|
|||
import dev.zontreck.essentials.commands.teleport.TeleportActioner;
|
||||
import dev.zontreck.essentials.commands.teleport.TeleportContainer;
|
||||
import dev.zontreck.essentials.commands.teleport.TeleportDestination;
|
||||
import dev.zontreck.essentials.configs.AEServerConfig;
|
||||
import dev.zontreck.essentials.homes.Home;
|
||||
import dev.zontreck.essentials.homes.NoSuchHomeException;
|
||||
import dev.zontreck.libzontreck.currency.Bank;
|
||||
import dev.zontreck.libzontreck.currency.Transaction;
|
||||
import dev.zontreck.libzontreck.exceptions.InvalidSideException;
|
||||
import dev.zontreck.libzontreck.util.ChatHelpers;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public class HomeCommand {
|
||||
public static void register(CommandDispatcher<CommandSourceStack> dispatcher)
|
||||
{
|
||||
|
@ -38,6 +44,18 @@ public class HomeCommand {
|
|||
ServerPlayer p = ctx.getPlayerOrException();
|
||||
Home home = AriasEssentials.player_homes.get(p.getUUID()).get(homeName);
|
||||
|
||||
//Transaction tx = new Transaction(Bank.getAccount(p.getUUID()), Bank.SYSTEM, AEServerConfig.COST_TO_TP_HOME.get(), Instant.now().getEpochSecond());
|
||||
|
||||
//ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(Messages.PAYMENT_ATTEMPTING,
|
||||
// "$" + String.valueOf(AEServerConfig.COST_TO_TP_HOME.get()), "SYSTEM"), p.server);
|
||||
/*if(true)
|
||||
{
|
||||
ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(Messages.PAYMENT_SUCCESS), p.server);
|
||||
}else {
|
||||
ChatHelpers.broadcastTo(p.getUUID(), ChatHelpers.macro(Messages.PAYMENT_FAILED), p.server);
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
TeleportDestination dest = home.destination;
|
||||
TeleportActioner.ApplyTeleportEffect(p);
|
||||
TeleportContainer cont = new TeleportContainer(p, dest.Position.asMinecraftVector(), dest.Rotation.asMinecraftVector(), dest.getActualDimension());
|
||||
|
@ -54,7 +72,7 @@ public class HomeCommand {
|
|||
ChatHelpers.broadcastTo(ctx.getEntity().getUUID(), ChatHelpers.macro(Messages.TELEPORT_HOME_FAIL), ctx.getServer());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue