mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-06-25 10:14:59 +02:00
fix for saving/loading data for worlds with periods (".") in the name; release 1.0.1
This commit is contained in:
parent
3286c53515
commit
dddceca7f1
|
@ -11,4 +11,4 @@ This plugin is intended to be able to supersede BorderGuard Lite and rBorder in
|
||||||
More Info
|
More Info
|
||||||
=========
|
=========
|
||||||
|
|
||||||
<a href="http://forums.bukkit.org/threads/mech-worldborder-v1-0-borders-for-multiple-worlds-round-or-square-617.11309">Bukkit Forum Topic</a>
|
<a href="http://forums.bukkit.org/threads/worldborder-617.11309/">Bukkit Forum Topic</a>
|
|
@ -216,7 +216,7 @@ public class Config
|
||||||
while(world.hasNext())
|
while(world.hasNext())
|
||||||
{
|
{
|
||||||
Entry wdata = (Entry)world.next();
|
Entry wdata = (Entry)world.next();
|
||||||
String name = (String)wdata.getKey();
|
String name = ((String)wdata.getKey()).replace("/", ".");
|
||||||
ConfigurationNode bord = (ConfigurationNode)wdata.getValue();
|
ConfigurationNode bord = (ConfigurationNode)wdata.getValue();
|
||||||
BorderData border = new BorderData(bord.getDouble("x", 0), bord.getDouble("z", 0), bord.getInt("radius", 0));
|
BorderData border = new BorderData(bord.getDouble("x", 0), bord.getDouble("z", 0), bord.getInt("radius", 0));
|
||||||
borders.put(name, border);
|
borders.put(name, border);
|
||||||
|
@ -250,9 +250,9 @@ public class Config
|
||||||
Entry wdata = (Entry)world.next();
|
Entry wdata = (Entry)world.next();
|
||||||
String name = (String)wdata.getKey();
|
String name = (String)wdata.getKey();
|
||||||
BorderData bord = (BorderData)wdata.getValue();
|
BorderData bord = (BorderData)wdata.getValue();
|
||||||
cfg.setProperty("worlds." + name + ".x", bord.getX());
|
cfg.setProperty("worlds." + name.replace(".", "/") + ".x", bord.getX());
|
||||||
cfg.setProperty("worlds." + name + ".z", bord.getZ());
|
cfg.setProperty("worlds." + name.replace(".", "/") + ".z", bord.getZ());
|
||||||
cfg.setProperty("worlds." + name + ".radius", bord.getRadius());
|
cfg.setProperty("worlds." + name.replace(".", "/") + ".radius", bord.getRadius());
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg.save();
|
cfg.save();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
name: WorldBorder
|
name: WorldBorder
|
||||||
author: Brettflan
|
author: Brettflan
|
||||||
description: Limit the size of your worlds with a border, round or square.
|
description: Limit the size of your worlds with a border, round or square.
|
||||||
version: 1.0
|
version: 1.0.1
|
||||||
main: com.wimbli.WorldBorder.WorldBorder
|
main: com.wimbli.WorldBorder.WorldBorder
|
||||||
commands:
|
commands:
|
||||||
wborder:
|
wborder:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user