package mgt.xjboss.WrenchBreakProtect;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;

import org.bukkit.plugin.java.JavaPlugin;


public class Main extends JavaPlugin {
	String Wrenches[]=null;
	public void onEnable(){
		getServer().getPluginManager().registerEvents(new Event(this), this);;
		LoadWrenches(); 
		System.out.println("[WrenchBreakProtect]Powered by xjboss website:xjboss.net");
	}
	public void LoadWrenches(){
		InputStream WrenchesR=this.getClass().getResourceAsStream("/Wrenches.txt");
		BufferedReader WrenchesF=new BufferedReader(new InputStreamReader(WrenchesR,Charset.forName("utf-8")));
		Object[] ArrayWrenchesF=WrenchesF.lines().toArray();
		int Count=(int)(ArrayWrenchesF.length);
		//System.out.println(Count);
		Wrenches=new String[Count];
			for(int i=0;i<Count;i++){
				Wrenches[i]=ArrayWrenchesF[i].toString();
			}
		try {
			WrenchesF.close();
			WrenchesR.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public boolean checkWrench(String itemname){
		String IN=itemname.split(":")[0];
		for(int i=0;i<Wrenches.length;i++){
			if((itemname.equals(Wrenches[i]))|(IN.equals(Wrenches[i])))return true;
		}
		return false;
	}
}

@@ -716,30 +716,97 @@
 ;%0A%09%09
-Object%5B%5D Array
+%0A%09%09int Count=0;%0A%09%09//System.out.println(Count);%0A%09%09String Wrenches2=%22%22;%0A%09%09try %7B%0A%09%09%09
 Wrenches
 F=Wr
@@ -801,18 +801,20 @@
 Wrenches
-F=
+2 = 
 Wrenches
@@ -819,209 +819,437 @@
 esF.
-lines().toArray();%0A%09%09int Count=(int)(ArrayWrenchesF.length);%0A%09%09//System.out.println(Count);%0A%09%09Wrenches=new String%5BCount%5D;%0A%09%09%09for(int i=0;i%3CCount;i++)%7B%0A%09%09%09%09Wrenches%5Bi%5D=ArrayWrenchesF%5Bi%5D.toString();%0A%09%09%09%7D
+readLine();%0A%09%09%7D catch (IOException e1) %7B%0A%09%09%09// TODO Auto-generated catch block%0A%09%09%09e1.printStackTrace();%0A%09%09%7D;%0A%09%09//Wrenches=new String%5BCount%5D;%0A%09%09try %7B%0A%09%09%09while(true)%7B%0A%09%09%09%09String WRF = WrenchesF.readLine();%0A%09%09%09%09Wrenches2=Wrenches2+(char)(233)+WRF;%0A%09%09%09%09if(WRF==null)break;%0A%09%09%09%7D%0A%09%09%09%7D catch (IOException e) %7B%0A%09%09%09%09// TODO Auto-generated catch block%0A%09%09%09%09e.printStackTrace();%0A%09%09%09%7D%0A%09%09Wrenches=Wrenches2.split(new String(((char)(233))+%22%22));
 %0A%09%09t

Update #3 Now can use it with java7