/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/DoorStorage.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/secretdoor/DoorStorage.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2430 by torben, Sun Jan 13 13:05:16 2013 UTC revision 2431 by torben, Mon Mar 9 13:45:03 2015 UTC
# Line 1  Line 1 
1  package dk.thoerup.bukkit.hoeruputils.secretdoor;  package dk.thoerup.bukkit.hoeruputils.secretdoor;
2    
3  import java.io.File;  import java.io.File;
 import java.io.FileNotFoundException;  
 import java.io.IOException;  
 import java.io.RandomAccessFile;  
4  import java.util.HashMap;  import java.util.HashMap;
5  import java.util.LinkedList;  import java.util.LinkedList;
6  import java.util.Set;  import java.util.Set;
7    
 import org.bukkit.configuration.file.YamlConfiguration;  
8  import org.bukkit.Location;  import org.bukkit.Location;
9  import org.bukkit.World;  import org.bukkit.World;
10    import org.bukkit.block.BlockFace;
11    import org.bukkit.configuration.file.YamlConfiguration;
12  import org.bukkit.plugin.Plugin;  import org.bukkit.plugin.Plugin;
13    
14  public class DoorStorage {  public class DoorStorage {
# Line 52  public class DoorStorage { Line 50  public class DoorStorage {
50                          config.set( i + ".x", door.getLeftUpper().getBlockX() );                          config.set( i + ".x", door.getLeftUpper().getBlockX() );
51                          config.set( i + ".y", door.getLeftUpper().getBlockY() );                          config.set( i + ".y", door.getLeftUpper().getBlockY() );
52                          config.set( i + ".z", door.getLeftUpper().getBlockZ() );                          config.set( i + ".z", door.getLeftUpper().getBlockZ() );
53                          config.set( i + ".direction", door.getDirection()  );                          config.set( i + ".direction", door.getDirection().toString()  );
54                          config.set( i + ".width", door.getWidth() );                          config.set( i + ".width", door.getWidth() );
55                          config.set( i + ".height", door.getHeight() );                          config.set( i + ".height", door.getHeight() );
56                          config.set( i + ".owner", door.getOwner() );                          config.set( i + ".owner", door.getOwner() );
# Line 95  public class DoorStorage { Line 93  public class DoorStorage {
93                          int z = config.getInt( key + ".z", 0);                          int z = config.getInt( key + ".z", 0);
94                          Location loc = new Location(world, x, y, z);                          Location loc = new Location(world, x, y, z);
95                                                                    
96                          int direction = config.getInt( key + ".direction", 0);                          String directionStr = config.getString( key + ".direction", "");
97                            BlockFace direction = BlockFace.valueOf(directionStr);
98                            
99                          int width = config.getInt( key + ".width", 0);                          int width = config.getInt( key + ".width", 0);
100                          int height = config.getInt( key + ".height", 0);                          int height = config.getInt( key + ".height", 0);
101    
# Line 103  public class DoorStorage { Line 103  public class DoorStorage {
103    
104                          boolean isPrivate = config.getBoolean( key + ".private", false);                          boolean isPrivate = config.getBoolean( key + ".private", false);
105                          String password = config.getString( key + ".password", "");                          String password = config.getString( key + ".password", "");
106                            
107                            
108                                                                    
109                          Door door = new Door(loc, direction, width, height, owner, isPrivate, password);                          Door door = new Door(loc, direction, width, height, owner, isPrivate, password);
110                          doors.add( door );                          doors.add( door );

Legend:
Removed from v.2430  
changed lines
  Added in v.2431

  ViewVC Help
Powered by ViewVC 1.1.20