1212
1313namespace jsmod2
1414{
15- [ PluginDetails (
16- author = "Magiclu550" ,
17- name = "ProxyHandler" ,
18- description = "用于响应JSMOD2端" ,
19- id = "cn.jsmod2.ProxyHandler" ,
20- configPrefix = "ep" ,
21- langFile = "ProxyHandler" ,
22- version = "1.0" ,
23- SmodMajor = 3 ,
24- SmodMinor = 4 ,
25- SmodRevision = 0
26- ) ]
15+
2716 /**
2817 * ProxyHandler主端,用于交互Jsmod2协议
2918 * JSON交互采用Socket
@@ -34,9 +23,15 @@ namespace jsmod2
3423
3524 public class RegisterEvents
3625 {
37- private static HashMap < int , Type > events = new HashMap < int , Type > ( ) ;
26+ private static HashMap < int , Type > events ;
3827
39- private static HashMap < Type , int > events_Id = new HashMap < Type , int > ( ) ;
28+ private static HashMap < Type , int > events_Id ;
29+
30+ static RegisterEvents ( )
31+ {
32+ events = new HashMap < int , Type > ( ) ;
33+ events_Id = new HashMap < Type , int > ( ) ;
34+ }
4035 public static void registerEvents ( )
4136 {
4237 events . put ( 0x01 , typeof ( AdminQueryEvent ) ) ; //packet 1
@@ -129,6 +124,19 @@ public static int getId(Type t)
129124 }
130125
131126 }
127+
128+ [ PluginDetails (
129+ author = "Magiclu550" ,
130+ name = "ProxyHandler" ,
131+ description = "用于响应JSMOD2端" ,
132+ id = "cn.jsmod2.ProxyHandler" ,
133+ configPrefix = "ep" ,
134+ langFile = "ProxyHandler" ,
135+ version = "1.0" ,
136+ SmodMajor = 3 ,
137+ SmodMinor = 4 ,
138+ SmodRevision = 0
139+ ) ]
132140 class ProxyHandler : Plugin
133141 {
134142
@@ -153,7 +161,7 @@ public override void Register()
153161 . append ( "jsmod2.port" , "19935" )
154162 . append ( "jsmod2.debug" , "false" )
155163 . create ( Server . GetAppFolder ( ) + "/jsmod2.conf" ) ;
156-
164+
157165 }
158166
159167 public override void OnEnable ( )
0 commit comments