/[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 3235 by torben, Fri Nov 18 13:23:24 2016 UTC revision 3236 by torben, Sun Jul 15 10:04:25 2018 UTC
# Line 86  public class DoorStorage { Line 86  public class DoorStorage {
86                                                    
87    
88                  for (String key : keys) {                  for (String key : keys) {
89                            try {
90                                                    
91                          World world = plugin.getServer().getWorld( config.getString(key + ".world") );                                  World world = plugin.getServer().getWorld( config.getString(key + ".world") );
92                          int x = config.getInt( key + ".x", 0);                                  int x = config.getInt( key + ".x", 0);
93                          int y = config.getInt( key + ".y", 0);                                  int y = config.getInt( key + ".y", 0);
94                          int z = config.getInt( key + ".z", 0);                                  int z = config.getInt( key + ".z", 0);
95                          Location loc = new Location(world, x, y, z);                                  Location loc = new Location(world, x, y, z);
96                                                                    
97                          String directionStr = config.getString( key + ".direction", "");                                  String directionStr = config.getString( key + ".direction", "");
98                          //BlockFace direction = BlockFace.valueOf(directionStr);                                  //BlockFace direction = BlockFace.valueOf(directionStr);
99                          int dir = Integer.parseInt( directionStr );                                  int dir = Integer.parseInt( directionStr );
100    
101                          BlockFace direction = BlockFace.values()[ dir ];                                  BlockFace direction = BlockFace.values()[ dir ];
102                                                    
103                          int width = config.getInt( key + ".width", 0);                                  int width = config.getInt( key + ".width", 0);
104                          int height = config.getInt( key + ".height", 0);                                  int height = config.getInt( key + ".height", 0);
105    
106                          String owner = config.getString( key + ".owner");                                  String owner = config.getString( key + ".owner");
107    
108                          boolean isPrivate = config.getBoolean( key + ".private", false);                                  boolean isPrivate = config.getBoolean( key + ".private", false);
109                          String password = config.getString( key + ".password", "");                                  String password = config.getString( key + ".password", "");
110                                                    
111                                                    
112                                                                    
113                          Door door = new Door(loc, direction, width, height, owner, isPrivate, password);                                  Door door = new Door(loc, direction, width, height, owner, isPrivate, password);
114                          doors.add( door );                                  doors.add( door );
115                          door.registerMap(doormap);                                  door.registerMap(doormap);
116                            } catch (Exception e) {
117                                    System.out.println("[SecretDoor] DoorStorage: exception loading door : " + e.getMessage() );
118                                    e.printStackTrace();
119                            }
120                  }                                        }                      
121                                                    
122                  System.out.println("[SecretDoor] loaded " + doors.size() + " doors");                  System.out.println("[SecretDoor] loaded " + doors.size() + " doors");

Legend:
Removed from v.3235  
changed lines
  Added in v.3236

  ViewVC Help
Powered by ViewVC 1.1.20