alex9849 / advanced-region-market

A Bukkit/Spigot plugin for renting/selling WorldGuard regions
https://www.spigotmc.org/resources/advancedregionmarket.58732/
69 stars 45 forks source link

Suggestion: teleportLoc allow decimal places for XYZ #118

Closed Valtn closed 2 years ago

Valtn commented 2 years ago

It would be great it you could make the warp location (regions.yml > world > region > teleportLoc) save decimal places (or at the very least cap it to two decimal places), so that we could set non integer XYZ:

teleportLoc: world;-17.5;16.0;-29.0;0.0;90.0

which currently throws:

[INFO]: [AdvancedRegionMarket] Enabling AdvancedRegionMarket v3.3.7
[INFO]: [AdvancedRegionMarket] Using WorldGuard7 adapter
[INFO]: [AdvancedRegionMarket] Using WorldEdit7 adapter
[INFO]: [AdvancedRegionMarket] Using MC 1.14 sign adapter
[ERROR]: Error occurred while enabling AdvancedRegionMarket v3.3.7 (Is it up to date?)
java.lang.NumberFormatException: For input string: "-17.5"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:668) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:786) ~[?:?]
        at net.alex9849.arm.regions.RegionManager.parseTpLocation(RegionManager.java:432) ~[advancedregionmarket.jar:?]
        at net.alex9849.arm.regions.RegionManager.parseRegion(RegionManager.java:178) ~[advancedregionmarket.jar:?]
        at net.alex9849.arm.regions.RegionManager.loadSavedObjects(RegionManager.java:122) ~[advancedregionmarket.jar:?]
        at net.alex9849.arm.util.YamlFileManager.<init>(YamlFileManager.java:24) ~[advancedregionmarket.jar:?]
        at net.alex9849.arm.regions.RegionManager.<init>(RegionManager.java:45) ~[advancedregionmarket.jar:?]
        at net.alex9849.arm.AdvancedRegionMarket.startup(AdvancedRegionMarket.java:216) ~[advancedregionmarket.jar:?]
        at net.alex9849.arm.AdvancedRegionMarket.onEnable(AdvancedRegionMarket.java:121) ~[advancedregionmarket.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) [...]