diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index f6691e4..643d668 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -31,4 +31,4 @@ jobs: - name: Build with Gradle uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 with: - arguments: shadowJar build + arguments: shadowJar diff --git a/README.md b/README.md index 92e28a3..f3c1ffe 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ stable: cost: 4500.0 # Cost to create the waypoint. travel_cost: 450 # Cost to travel to waypoint. max: 1 # Max number of plots of this type allowed per town. + travel_with_vehicle: true # If true, player's vehicle will travel with the player. permission: townywaypoints.landpoint.stable # Permission node required to set a plot to a type of this waypoint, if no permission is set anyone can create this waypoint, grant it in townyperms.yml allowed_biomes: # List of biomes this plot type can be created on. If it's not provided the plot type can be created on any biome. - FOREST @@ -77,6 +78,7 @@ seaport: cost: 2500.0 # Cost to create the waypoint. travel_cost: 250 # Cost to travel to waypoint. max: 1 # Max number of plots of this type allowed per town. + travel_with_vehicle: false # If true, player's vehicle will travel with the player. permission: townywaypoints.seapoint.seaport # Permission node required to set a plot to a type of this waypoint, if no permission is set anyone can create this waypoint, grant it in townyperms.yml allowed_biomes: # List of biomes this plot type can be created on. If it's not provided the plot type can be created on any biome. - COLD_OCEAN diff --git a/build.gradle.kts b/build.gradle.kts index 928186e..f97a9a9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "net.mvndicraft.townywaypoints" -version = "1.1-SNAPSHOT" +version = "1.2-SNAPSHOT" repositories { mavenCentral() @@ -22,11 +22,13 @@ dependencies { compileOnly("io.github.townyadvanced.commentedconfiguration:CommentedConfiguration:1.0.0") compileOnly("com.github.MilkBowl:VaultAPI:1.7") implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT") + implementation("com.github.Anon8281:UniversalScheduler:0.1.6") } tasks.named("shadowJar") { relocate("co.aikar.commands","net.mvndicraft.townywaypoints.acf") relocate("co.aikar.locales","net.mvndicraft.townywaypoints.locales") + relocate("com.github.Anon8281.universalScheduler", "net.mvndicraft.townywaypoints.universalscheduler") } java { diff --git a/src/main/java/net/mvndicraft/townywaypoints/TownyWaypoints.java b/src/main/java/net/mvndicraft/townywaypoints/TownyWaypoints.java index 1c705a7..3fd88b5 100644 --- a/src/main/java/net/mvndicraft/townywaypoints/TownyWaypoints.java +++ b/src/main/java/net/mvndicraft/townywaypoints/TownyWaypoints.java @@ -1,6 +1,8 @@ package net.mvndicraft.townywaypoints; import co.aikar.commands.PaperCommandManager; +import com.github.Anon8281.universalScheduler.UniversalScheduler; +import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskScheduler; import com.google.common.collect.ImmutableList; import com.palmergames.bukkit.towny.TownyAPI; import com.palmergames.bukkit.towny.object.*; @@ -27,6 +29,7 @@ public class TownyWaypoints extends JavaPlugin { private static TownyWaypoints instance; private static Economy economy; + private static TaskScheduler scheduler; protected static final ConcurrentHashMap waypoints = new ConcurrentHashMap<>(); private final String biomeKey = "allowed_biomes"; @@ -103,6 +106,7 @@ public void onEnable() public void onLoad() { instance = this; + scheduler = UniversalScheduler.getScheduler(instance); loadWaypoints(); } @@ -135,9 +139,15 @@ public static Economy getEconomy() return economy; } + public static TaskScheduler getScheduler() + { + return scheduler; + } + public String getVersion() { return instance.getPluginMeta().getVersion(); } + public static ConcurrentHashMap getWaypoints() { return waypoints; @@ -171,6 +181,7 @@ private static Waypoint createWaypoint(ConfigurationSection config) config.getDouble("travel_cost"), config.getInt("max"), config.getBoolean("sea"), + config.getBoolean("travel_with_vehicle"), config.getString("permission"), config.contains(instance.biomeKey) ? config.getStringList(instance.biomeKey) : new ArrayList<>() ); diff --git a/src/main/java/net/mvndicraft/townywaypoints/Waypoint.java b/src/main/java/net/mvndicraft/townywaypoints/Waypoint.java index eaa322a..af0266e 100644 --- a/src/main/java/net/mvndicraft/townywaypoints/Waypoint.java +++ b/src/main/java/net/mvndicraft/townywaypoints/Waypoint.java @@ -9,10 +9,11 @@ public final class Waypoint { private final double travelCost; private final int max; private final boolean sea; + private final boolean travelWithVehicle; private final String permission; private final List allowedBiomes; - public Waypoint(String name, String mapKey, double cost, double travelCost, int max, boolean sea, String permission, List allowedBiomes) + public Waypoint(String name, String mapKey, double cost, double travelCost, int max, boolean sea, boolean travelWithVehicle, String permission, List allowedBiomes) { this.name = name; this.mapKey = mapKey; @@ -20,6 +21,7 @@ public Waypoint(String name, String mapKey, double cost, double travelCost, int this.travelCost = travelCost; this.max = max; this.sea = sea; + this.travelWithVehicle = travelWithVehicle; this.permission = permission; this.allowedBiomes = allowedBiomes; } @@ -50,6 +52,10 @@ public boolean isSea() { return sea; } + public boolean travelWithVehicle() + { + return travelWithVehicle; + } public String getPermission() { diff --git a/src/main/java/net/mvndicraft/townywaypoints/commands/TownyWaypointsCommand.java b/src/main/java/net/mvndicraft/townywaypoints/commands/TownyWaypointsCommand.java index d3af6b1..08f679f 100644 --- a/src/main/java/net/mvndicraft/townywaypoints/commands/TownyWaypointsCommand.java +++ b/src/main/java/net/mvndicraft/townywaypoints/commands/TownyWaypointsCommand.java @@ -1,10 +1,28 @@ package net.mvndicraft.townywaypoints.commands; -import co.aikar.commands.BaseCommand; -import co.aikar.commands.annotation.*; +import javax.annotation.Nonnull; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; +import com.palmergames.bukkit.towny.Towny; import com.palmergames.bukkit.towny.TownyAPI; -import com.palmergames.bukkit.towny.object.*; +import com.palmergames.bukkit.towny.object.Resident; +import com.palmergames.bukkit.towny.object.Town; +import com.palmergames.bukkit.towny.object.TownBlock; +import com.palmergames.bukkit.towny.object.Translatable; import com.palmergames.bukkit.towny.tasks.CooldownTimerTask; +import com.palmergames.paperlib.PaperLib; +import co.aikar.commands.BaseCommand; +import co.aikar.commands.annotation.CommandAlias; +import co.aikar.commands.annotation.CommandCompletion; +import co.aikar.commands.annotation.CommandPermission; +import co.aikar.commands.annotation.Default; +import co.aikar.commands.annotation.Description; +import co.aikar.commands.annotation.Subcommand; +import co.aikar.commands.annotation.Syntax; import net.kyori.adventure.text.Component; import net.mvndicraft.townywaypoints.TownyWaypoints; import net.mvndicraft.townywaypoints.Waypoint; @@ -12,9 +30,6 @@ import net.mvndicraft.townywaypoints.settings.TownyWaypointsSettings; import net.mvndicraft.townywaypoints.util.Messaging; import net.mvndicraft.townywaypoints.util.TownBlockMetaDataController; -import org.bukkit.Location; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; @CommandAlias("townywaypoints|twaypoints|twp") public class TownyWaypointsCommand extends BaseCommand @@ -108,11 +123,13 @@ public static void onTravel(Player player, String townName, String waypointName, Waypoint waypoint = TownyWaypoints.getWaypoints().get(waypointName); double travelcost = waypoint.getTravelCost(); + boolean admin = player.hasPermission(TownyWaypoints.ADMIN_PERMISSION); + String plotName = townBlock.getName(); if (plotName.equals("")) plotName = Translatable.of("townywaypoints_plot_unnamed").defaultLocale(); - if (!player.hasPermission(TownyWaypoints.ADMIN_PERMISSION) && TownyWaypoints.getEconomy().getBalance(player) - travelcost < 0) { + if (!admin && TownyWaypoints.getEconomy().getBalance(player) - travelcost < 0) { Messaging.sendErrorMsg(player, Translatable.of("msg_err_waypoint_travel_insufficient_funds", plotName, travelcost)); return; } @@ -124,7 +141,7 @@ public static void onTravel(Player player, String townName, String waypointName, return; } - if (!player.hasPermission(TownyWaypoints.ADMIN_PERMISSION) && (TownyWaypointsSettings.getMaxDistance() != -1 && player.getLocation().distance(loc) > TownyWaypointsSettings.getMaxDistance())) { + if (!admin && (TownyWaypointsSettings.getMaxDistance() != -1 && player.getLocation().distance(loc) > TownyWaypointsSettings.getMaxDistance())) { Messaging.sendErrorMsg(player, Translatable.of("msg_err_waypoint_travel_too_far", townBlock.getName(), TownyWaypointsSettings.getMaxDistance())); return; } @@ -133,7 +150,7 @@ public static void onTravel(Player player, String townName, String waypointName, TownBlock playerTownBlock = townyAPI.getTownBlock(player); - if (!player.hasPermission(TownyWaypoints.ADMIN_PERMISSION) && (playerTownBlock == null || TownyWaypointsSettings.getPeerToPeer() && !playerTownBlock.getType().getName().equals(waypointName))) { + if (!admin && (playerTownBlock == null || TownyWaypointsSettings.getPeerToPeer() && !playerTownBlock.getType().getName().equals(waypointName))) { Messaging.sendErrorMsg(player, Translatable.of("msg_err_waypoint_p2p", waypointName, waypointName)); return; } @@ -143,14 +160,31 @@ public static void onTravel(Player player, String townName, String waypointName, return; int cooldown = CooldownTimerTask.getCooldownRemaining(player.getName(), "waypoint"); - if (player.hasPermission(TownyWaypoints.ADMIN_PERMISSION) || cooldown == 0) { + if (admin || cooldown == 0) { TownyWaypoints.getEconomy().withdrawPlayer(player, travelcost); - Messaging.sendMsg(player, Translatable.of("msg_waypoint_travel_warmup")); - townyAPI.requestTeleport(player, loc); + if (admin) + Messaging.sendMsg(player, Translatable.of("msg_waypoint_travel_warmup")); + else + Messaging.sendMsg(player, Translatable.of("msg_waypoint_travel_warmup_cost", travelcost)); + teleport(player, loc, waypoint.travelWithVehicle()); + if (!CooldownTimerTask.hasCooldown(player.getName(), "waypoint")) CooldownTimerTask.addCooldownTimer(player.getName(), "waypoint", TownyWaypointsSettings.getCooldown()); } else { Messaging.sendErrorMsg(player, Translatable.of("msg_err_waypoint_travel_cooldown", cooldown, townBlock.getName())); } } + + private static void teleport(@Nonnull final Player player, @Nonnull Location loc, boolean travelWithVehicle) { + Entity vehicle = player.getVehicle(); + boolean needToTpVehicle = travelWithVehicle && player.isInsideVehicle() && vehicle != null; + + if(needToTpVehicle) { + vehicle.eject(); + PaperLib.teleportAsync(vehicle, loc, TeleportCause.COMMAND); + } + PaperLib.teleportAsync(player, loc, TeleportCause.COMMAND); + if(needToTpVehicle) + TownyWaypoints.getScheduler().runTask(loc, () -> vehicle.addPassenger(player)); + } } diff --git a/src/main/resources/lang/af-ZA.yml b/src/main/resources/lang/af-ZA.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/af-ZA.yml +++ b/src/main/resources/lang/af-ZA.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/ar-SA.yml b/src/main/resources/lang/ar-SA.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/ar-SA.yml +++ b/src/main/resources/lang/ar-SA.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/ca-ES.yml b/src/main/resources/lang/ca-ES.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/ca-ES.yml +++ b/src/main/resources/lang/ca-ES.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/cs-CZ.yml b/src/main/resources/lang/cs-CZ.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/cs-CZ.yml +++ b/src/main/resources/lang/cs-CZ.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/da-DK.yml b/src/main/resources/lang/da-DK.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/da-DK.yml +++ b/src/main/resources/lang/da-DK.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/de-DE.yml b/src/main/resources/lang/de-DE.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/de-DE.yml +++ b/src/main/resources/lang/de-DE.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/el-GR.yml b/src/main/resources/lang/el-GR.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/el-GR.yml +++ b/src/main/resources/lang/el-GR.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/en-US.yml b/src/main/resources/lang/en-US.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/en-US.yml +++ b/src/main/resources/lang/en-US.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/es-ES.yml b/src/main/resources/lang/es-ES.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/es-ES.yml +++ b/src/main/resources/lang/es-ES.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/fi-FI.yml b/src/main/resources/lang/fi-FI.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/fi-FI.yml +++ b/src/main/resources/lang/fi-FI.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/fr-FR.yml b/src/main/resources/lang/fr-FR.yml index fc2b152..f17ee31 100644 --- a/src/main/resources/lang/fr-FR.yml +++ b/src/main/resources/lang/fr-FR.yml @@ -1,7 +1,7 @@ name: TownyWaypoints version: 1.0 -language: english -author: ewof +language: french +author: Hydrolien website: 'https://mvndicraft.net/' description: > Language file for all game messages. Do not alter this file. If you wish to change any of the entries, make a copy named something else. Alternate language files can be enabled by altering the [language] entry in config.yml @@ -28,14 +28,15 @@ msg_err_not_in_townblock: 'Parcelle non valide !' townywaypoints_plot_unnamed: 'Sans nom' msg_err_waypoint_spawn_not_set: 'Le spawn de l''étape n''est pas défini !' msg_err_waypoint_spawn_not_safe: 'Le spawn de l''étape n''est pas sûr !' -townywaypoints_msg_reload: '%s reloaded! If you updated waypoints.yml you must do /ta reload too.' +townywaypoints_msg_reload: '%s a été rechargé! Si vous avez mis à jour waypoints.yml vous devez faire /ta reload également.' msg_err_waypoint_travel_insufficient_funds: 'Fond insuffisant ! Voyager vers %s coute %.2f.' msg_err_waypoint_travel_insufficient_permission: 'Vous n''avez pas la permission de voyager vers %s !' msg_err_waypoint_create_insufficient_funds: 'Fond insuffisant ! Créer un(e) %s coûte %.2f !' msg_err_waypoint_create_insufficient_permission: 'Vous n''avez pas la permission de créer une étape %s !' msg_err_waypoint_travel_too_far: '%s est trop loin ! La distance de voyage maximale est %d.' msg_waypoint_travel_warmup: 'En attente de la téléportation...' +msg_waypoint_travel_warmup_cost: 'La téléportation vous coute %.2f. En attente de la téléportation...' msg_err_waypoint_travel_cooldown: 'Vous devez attendre %ds avant de voyager vers %s !' -msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' -msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' -msg_err_waypoint_set_open_insufficient_permission: 'You do not have permission to set the open status of this waypoint!' +msg_err_waypoint_p2p: 'Vous devez être dans une parcelle d''étape %s pour voyager vers une parcelle d''étape %s !' +msg_err_waypoint_set_spawn_insufficient_permission: 'Vous n''avez pas la permission de définir le spawn de cette étape !' +msg_err_waypoint_set_open_insufficient_permission: 'Vous n''avez pas la permission de définir l''accessibilité de cette étape !' diff --git a/src/main/resources/lang/he-IL.yml b/src/main/resources/lang/he-IL.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/he-IL.yml +++ b/src/main/resources/lang/he-IL.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/hu-HU.yml b/src/main/resources/lang/hu-HU.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/hu-HU.yml +++ b/src/main/resources/lang/hu-HU.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/it-IT.yml b/src/main/resources/lang/it-IT.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/it-IT.yml +++ b/src/main/resources/lang/it-IT.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/ja-JP.yml b/src/main/resources/lang/ja-JP.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/ja-JP.yml +++ b/src/main/resources/lang/ja-JP.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/ko-KR.yml b/src/main/resources/lang/ko-KR.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/ko-KR.yml +++ b/src/main/resources/lang/ko-KR.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/nl-NL.yml b/src/main/resources/lang/nl-NL.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/nl-NL.yml +++ b/src/main/resources/lang/nl-NL.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/no-NO.yml b/src/main/resources/lang/no-NO.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/no-NO.yml +++ b/src/main/resources/lang/no-NO.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/pl-PL.yml b/src/main/resources/lang/pl-PL.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/pl-PL.yml +++ b/src/main/resources/lang/pl-PL.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/pt-BR.yml b/src/main/resources/lang/pt-BR.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/pt-BR.yml +++ b/src/main/resources/lang/pt-BR.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/pt-PT.yml b/src/main/resources/lang/pt-PT.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/pt-PT.yml +++ b/src/main/resources/lang/pt-PT.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/ro-RO.yml b/src/main/resources/lang/ro-RO.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/ro-RO.yml +++ b/src/main/resources/lang/ro-RO.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/ru-RU.yml b/src/main/resources/lang/ru-RU.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/ru-RU.yml +++ b/src/main/resources/lang/ru-RU.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/sr-SP.yml b/src/main/resources/lang/sr-SP.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/sr-SP.yml +++ b/src/main/resources/lang/sr-SP.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/sv-SE.yml b/src/main/resources/lang/sv-SE.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/sv-SE.yml +++ b/src/main/resources/lang/sv-SE.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/tr-TR.yml b/src/main/resources/lang/tr-TR.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/tr-TR.yml +++ b/src/main/resources/lang/tr-TR.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/uk-UA.yml b/src/main/resources/lang/uk-UA.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/uk-UA.yml +++ b/src/main/resources/lang/uk-UA.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/vi-VN.yml b/src/main/resources/lang/vi-VN.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/vi-VN.yml +++ b/src/main/resources/lang/vi-VN.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/zh-CN.yml b/src/main/resources/lang/zh-CN.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/zh-CN.yml +++ b/src/main/resources/lang/zh-CN.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/lang/zh-TW.yml b/src/main/resources/lang/zh-TW.yml index b6f01b4..edf7b3d 100644 --- a/src/main/resources/lang/zh-TW.yml +++ b/src/main/resources/lang/zh-TW.yml @@ -35,6 +35,7 @@ msg_err_waypoint_create_insufficient_funds: 'Insufficient funds! Create cost for msg_err_waypoint_create_insufficient_permission: 'You do not have permission to create %s waypoint!' msg_err_waypoint_travel_too_far: '%s is too far away! Maximum travel distance is %d.' msg_waypoint_travel_warmup: 'Waiting to teleport...' +msg_waypoint_travel_warmup_cost: 'Travel cost is %.2f. Waiting to teleport...' msg_err_waypoint_travel_cooldown: 'You must wait %ds before traveling to %s!' msg_err_waypoint_p2p: 'You must be standing in a %s waypoint plot to travel to another %s waypoint!' msg_err_waypoint_set_spawn_insufficient_permission: 'You do not have permission to set the spawn of this waypoint!' diff --git a/src/main/resources/paper-plugin.yml b/src/main/resources/paper-plugin.yml index 5826e32..aa8c569 100644 --- a/src/main/resources/paper-plugin.yml +++ b/src/main/resources/paper-plugin.yml @@ -1,5 +1,5 @@ name: TownyWaypoints -version: '1.1' +version: '1.2' main: net.mvndicraft.townywaypoints.TownyWaypoints description: Configurable Waypoints as Towny plots api-version: '1.20' diff --git a/src/main/resources/waypoints.yml b/src/main/resources/waypoints.yml index 20b62ae..96c2c41 100644 --- a/src/main/resources/waypoints.yml +++ b/src/main/resources/waypoints.yml @@ -4,6 +4,7 @@ stable: cost: 4500.0 # Cost to create the waypoint. travel_cost: 450 # Cost to travel to waypoint. max: 1 # Max number of plots of this type allowed per town. + travel_with_vehicle: true # If true, player's vehicle will travel with the player. permission: townywaypoints.landpoint.stable # Permission node required to set a plot to a type of this waypoint, if no permission is set anyone can create this waypoint, grant it in townyperms.yml allowed_biomes: # List of biomes this plot type can be created on. If it's not provided the plot type can be created on any biome. - FOREST @@ -21,6 +22,7 @@ seaport: cost: 2500.0 # Cost to create the waypoint. travel_cost: 250 # Cost to travel to waypoint. max: 1 # Max number of plots of this type allowed per town. + travel_with_vehicle: false # If true, player's vehicle will travel with the player. permission: townywaypoints.seapoint.seaport # Permission node required to set a plot to a type of this waypoint, if no permission is set anyone can create this waypoint, grant it in townyperms.yml allowed_biomes: # List of biomes this plot type can be created on. If it's not provided the plot type can be created on any biome. - COLD_OCEAN