Skip to content

Commit

Permalink
werks
Browse files Browse the repository at this point in the history
  • Loading branch information
FunnyJ2 authored and FunnyJ2 committed Aug 30, 2012
1 parent 5fdc389 commit 6412bc9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
22 changes: 11 additions & 11 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
portals:
example:
shape: |
XXOXX
XOOOX
XOOOX
XXXXX
x: 100
y: 70
z: 100
permission: portal.example
portals: [example]
example:
shape: [XXOXX,XOOOX,XOOOX,XXXXX]
# XXOXX
# XOOOX
# XOOOX
# XXXXX
x: 100
y: 70
z: 100
permission: portal.example
1 change: 1 addition & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Portals
main: to.joe.j2mc.portals.J2MC_Portals
website: http://forums.joe.to
author: J2 Minecraft Plugin Team
version: 1.0-SNAPSHOT
Expand Down
6 changes: 3 additions & 3 deletions src/to/joe/j2mc/portals/J2MC_Portals.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ public void onEnable() {

public void loadPortalAreas() {
for(String area : this.getConfig().getStringList("portals")) {
String path = "portals." + area;
String path = /*"portals." + */area;
int x = this.getConfig().getInt(path + ".x");
int y = this.getConfig().getInt(path + ".y");
int z = this.getConfig().getInt(path + ".z");
Location upperLeft = new Location(this.getServer().getWorlds().get(0), x, y, z);

HashSet<Location> locations = new HashSet<Location>();
//TODO load all the locations from the map
List<String> shape = this.getConfig().getStringList(path + ".shape");
//int height = shape.size();
int width = shape.get(0).length();
Expand All @@ -44,11 +43,12 @@ public void loadPortalAreas() {
this.getPluginLoader().disablePlugin(this);
return;
}
for(int i = 0; i > width; i++) {
for(int i = 0; i < width; i++) {
if(line.charAt(i) == 'X') {
Location loc = new Location(this.getServer().getWorlds().get(0), x + i, y, curZ);
locations.add(loc);
loc.getBlock().setType(Material.BEDROCK); //debug
this.getLogger().info("Placed bedrock at " + loc.getX() + " " + loc.getBlockY() + " " + loc.getZ());
}
}
curZ++;
Expand Down

0 comments on commit 6412bc9

Please sign in to comment.