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