gm限制
parent
52aa71a362
commit
be16318ce5
|
|
@ -28,6 +28,8 @@ public class ServerProperties {
|
|||
|
||||
private boolean autoOpen;
|
||||
|
||||
private boolean debug;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -108,6 +110,14 @@ public class ServerProperties {
|
|||
this.autoOpen = autoOpen;
|
||||
}
|
||||
|
||||
public boolean isDebug() {
|
||||
return debug;
|
||||
}
|
||||
|
||||
public void setDebug(boolean debug) {
|
||||
this.debug = debug;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ServerProperties{" +
|
||||
|
|
@ -120,6 +130,8 @@ public class ServerProperties {
|
|||
", sendlog37=" + sendlog37 +
|
||||
", guildFight =" + guildFight +
|
||||
", areaId="+areaId+
|
||||
", autoOpen="+autoOpen+
|
||||
", debug="+debug+
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.ljsd.jieling.config.clazzStaticCfg.HeroStaticConfig;
|
|||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.globals.GlobalGm;
|
||||
|
|
@ -48,6 +49,9 @@ public class GMRequestHandler extends BaseHandler{
|
|||
}
|
||||
@Override
|
||||
public void process(ISession iSession, PacketNetData netData) throws Exception {
|
||||
if(!GameApplication.serverProperties.isDebug()){
|
||||
throw new ErrorCodeException("In a formal setting");
|
||||
}
|
||||
byte[] message = netData.parseClientProtoNetData();
|
||||
CommonProto.GMCommand gmCommand = CommonProto.GMCommand.parseFrom(message);
|
||||
String command = gmCommand.getCommand();
|
||||
|
|
|
|||
Loading…
Reference in New Issue