Disallowed '.' in region IDs.

This commit is contained in:
sk89q 2011-04-02 01:41:13 -07:00
parent ea79efe693
commit 949c6599b3
3 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ public static void define(CommandContext args, WorldGuardPlugin plugin,
Player player = plugin.checkPlayer(sender); Player player = plugin.checkPlayer(sender);
WorldEditPlugin worldEdit = plugin.getWorldEdit(); WorldEditPlugin worldEdit = plugin.getWorldEdit();
String id = args.getString(0); String id = args.getString(0).replace(".", "");
// Attempt to get the player's selection from WorldEdit // Attempt to get the player's selection from WorldEdit
Selection sel = worldEdit.getSelection(player); Selection sel = worldEdit.getSelection(player);
@ -182,7 +182,7 @@ public static void claim(CommandContext args, WorldGuardPlugin plugin,
Player player = plugin.checkPlayer(sender); Player player = plugin.checkPlayer(sender);
LocalPlayer localPlayer = plugin.wrapPlayer(player); LocalPlayer localPlayer = plugin.wrapPlayer(player);
WorldEditPlugin worldEdit = plugin.getWorldEdit(); WorldEditPlugin worldEdit = plugin.getWorldEdit();
String id = args.getString(0); String id = args.getString(0).replace(".", "");
// Attempt to get the player's selection from WorldEdit // Attempt to get the player's selection from WorldEdit
Selection sel = worldEdit.getSelection(player); Selection sel = worldEdit.getSelection(player);

View File

@ -94,7 +94,7 @@ public void load() throws IOException {
continue; continue;
} }
String id = line[0].toLowerCase(); String id = line[0].toLowerCase().replace(".", "");
String type = line[1]; String type = line[1];
ArrayReader<String> entries = new ArrayReader<String>(line); ArrayReader<String> entries = new ArrayReader<String>(line);

View File

@ -65,7 +65,7 @@ public void load() throws IOException {
regions = new HashMap<String, ProtectedRegion>(); regions = new HashMap<String, ProtectedRegion>();
for (Map.Entry<String, ConfigurationNode> entry : regionData.entrySet()) { for (Map.Entry<String, ConfigurationNode> entry : regionData.entrySet()) {
String id = entry.getKey().toLowerCase(); String id = entry.getKey().toLowerCase().replace(".", "");
ConfigurationNode node = entry.getValue(); ConfigurationNode node = entry.getValue();
String type = node.getString("type"); String type = node.getString("type");