mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-09-27 03:52:37 +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
|
||||
=========
|
||||
|
||||
<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())
|
||||
{
|
||||
Entry wdata = (Entry)world.next();
|
||||
String name = (String)wdata.getKey();
|
||||
String name = ((String)wdata.getKey()).replace("/", ".");
|
||||
ConfigurationNode bord = (ConfigurationNode)wdata.getValue();
|
||||
BorderData border = new BorderData(bord.getDouble("x", 0), bord.getDouble("z", 0), bord.getInt("radius", 0));
|
||||
borders.put(name, border);
|
||||
@ -250,9 +250,9 @@ public class Config
|
||||
Entry wdata = (Entry)world.next();
|
||||
String name = (String)wdata.getKey();
|
||||
BorderData bord = (BorderData)wdata.getValue();
|
||||
cfg.setProperty("worlds." + name + ".x", bord.getX());
|
||||
cfg.setProperty("worlds." + name + ".z", bord.getZ());
|
||||
cfg.setProperty("worlds." + name + ".radius", bord.getRadius());
|
||||
cfg.setProperty("worlds." + name.replace(".", "/") + ".x", bord.getX());
|
||||
cfg.setProperty("worlds." + name.replace(".", "/") + ".z", bord.getZ());
|
||||
cfg.setProperty("worlds." + name.replace(".", "/") + ".radius", bord.getRadius());
|
||||
}
|
||||
|
||||
cfg.save();
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: WorldBorder
|
||||
author: Brettflan
|
||||
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
|
||||
commands:
|
||||
wborder:
|
||||
|
Loading…
Reference in New Issue
Block a user