View difference between Paste ID: ErLPSiMS and ms7mHby5
SHOW: | | - or go back to the newest paste.
1
		boolean vEnabled = true;//< hardcode defaut
2
		blackList.add("GLASS");//< hardcoded default
3
4
		vEnabled = plugin.config.getBoolean("global.vinecontrol_enabled",
5
				vEnabled);//< last parameter is returned if no global setting is found 
6
					  // either the hardcoded default is overwritten by global 
7
					  // setting or kept
8
		
9
		if (plugin.config.contains(cBlock.getWorld().getName().toString())) {
10
			vEnabled = plugin.config.getBoolean(cBlock.getWorld().getName()
11
					.toString()
12
					+ ".vinecontrol_enabled", vEnabled);//< last parameter is returned if no world setting is found 
13-
					  				    // either the global(or hardcoded) setting is overwritten by  
13+
					  				    // either the global(or hardcoded) setting is overwritten  
14-
								       	    // world setting or kept
14+
								       	    // by world setting or kept
15
		}
16
		ApplicableRegionSet rSet = WGBukkit.getRegionManager(cBlock.getWorld())
17
				.getApplicableRegions(cBlock.getLocation());
18
		Iterator<ProtectedRegion> i = rSet.iterator();	
19
		ArrayList<ProtectedRegion> rList = new ArrayList<ProtectedRegion>(); 
20
		
21
		while(i.hasNext()){
22
			ProtectedRegion r = i.next();
23
			//plugin.log.info(r.getId().toString()+" end list");
24
			rList.add(0,r);
25
		}
26
		i = rList.iterator();
27
		
28
		while (i.hasNext()) {
29
			ProtectedRegion r = i.next();
30
			vEnabled = plugin.config.getBoolean(
31
					cBlock.getWorld().getName().toString() + "."
32
							+ r.getId().toString()
33
							+ ".vinecontrol_enabled", vEnabled);//same here with region