mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-09 15:23:28 -04:00
Add option to disable CPE
This commit is contained in:
parent
9a96e2aa1e
commit
1cad019a44
@ -28,10 +28,10 @@ namespace MCGalaxy.Commands.CPE {
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
message = message.ToLower();
|
||||
if (message.CaselessEq("preset")) {
|
||||
SendPresetsMessage(p); return;
|
||||
}
|
||||
message = message.ToLower();
|
||||
|
||||
if (!LevelInfo.ValidateAction(p, p.level, "set env settings of this level")) return;
|
||||
string[] args = message.SplitSpaces();
|
||||
|
@ -43,12 +43,12 @@ namespace MCGalaxy {
|
||||
OnPlayerStartConnectingEvent.Call(this, mppass);
|
||||
if (cancelconnecting) { cancelconnecting = false; return; }
|
||||
|
||||
byte protocolType = buffer[offset + 130];
|
||||
hasCpe = buffer[offset + 130] == 0x42 && ServerConfig.EnableCPE;
|
||||
Loading = true;
|
||||
if (disconnected) return;
|
||||
|
||||
if (protocolType == 0x42) { hasCpe = true; SendCpeExtensions(); }
|
||||
if (protocolType != 0x42) CompleteLoginProcess();
|
||||
if (hasCpe) { SendCpeExtensions(); }
|
||||
else { CompleteLoginProcess(); }
|
||||
}
|
||||
|
||||
void SendCpeExtensions() {
|
||||
|
@ -77,6 +77,8 @@ namespace MCGalaxy {
|
||||
|
||||
[ConfigBool("check-updates", "Update", false)]
|
||||
public static bool CheckForUpdates = true;
|
||||
[ConfigBool("enable-cpe", "Server", true)]
|
||||
public static bool EnableCPE = true;
|
||||
|
||||
[ConfigInt("rplimit", "Other", 500, 0, 50000)]
|
||||
public static int PhysicsRestartLimit = 500;
|
||||
|
Loading…
x
Reference in New Issue
Block a user