Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-25 15:50:14 +01:00
Merge remote-tracking branch 'origin/floodgate-2.0' into feature/1.17
Dieser Commit ist enthalten in:
Commit
9568a3a866
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019-2021 GeyserMC. http://geysermc.org
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*
|
||||||
|
* @author GeyserMC
|
||||||
|
* @link https://github.com/GeyserMC/Geyser
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.geysermc.floodgate.util;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
public class FloodgateGitPropertiesHolder {
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
private static Properties gitProperties;
|
||||||
|
}
|
@ -43,6 +43,7 @@ import org.geysermc.connector.utils.DockerCheck;
|
|||||||
import org.geysermc.connector.utils.FileUtils;
|
import org.geysermc.connector.utils.FileUtils;
|
||||||
import org.geysermc.floodgate.util.DeviceOs;
|
import org.geysermc.floodgate.util.DeviceOs;
|
||||||
import org.geysermc.floodgate.util.FloodgateConfigHolder;
|
import org.geysermc.floodgate.util.FloodgateConfigHolder;
|
||||||
|
import org.geysermc.floodgate.util.FloodgateGitPropertiesHolder;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -60,9 +61,9 @@ public class DumpInfo {
|
|||||||
private final DumpInfo.VersionInfo versionInfo;
|
private final DumpInfo.VersionInfo versionInfo;
|
||||||
private Properties gitInfo;
|
private Properties gitInfo;
|
||||||
private final GeyserConfiguration config;
|
private final GeyserConfiguration config;
|
||||||
private final Object floodgateConfig;
|
private final Floodgate floodgate;
|
||||||
private final HashInfo hashInfo;
|
|
||||||
private final Object2IntMap<DeviceOs> userPlatforms;
|
private final Object2IntMap<DeviceOs> userPlatforms;
|
||||||
|
private final HashInfo hashInfo;
|
||||||
private final RamInfo ramInfo;
|
private final RamInfo ramInfo;
|
||||||
private final BootstrapDumpInfo bootstrapInfo;
|
private final BootstrapDumpInfo bootstrapInfo;
|
||||||
|
|
||||||
@ -76,7 +77,7 @@ public class DumpInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.config = GeyserConnector.getInstance().getConfig();
|
this.config = GeyserConnector.getInstance().getConfig();
|
||||||
this.floodgateConfig = FloodgateConfigHolder.getConfig();
|
this.floodgate = new Floodgate();
|
||||||
|
|
||||||
String md5Hash = "unknown";
|
String md5Hash = "unknown";
|
||||||
String sha256Hash = "unknown";
|
String sha256Hash = "unknown";
|
||||||
@ -95,7 +96,6 @@ public class DumpInfo {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hashInfo = new HashInfo(md5Hash, sha256Hash);
|
this.hashInfo = new HashInfo(md5Hash, sha256Hash);
|
||||||
|
|
||||||
this.ramInfo = new DumpInfo.RamInfo();
|
this.ramInfo = new DumpInfo.RamInfo();
|
||||||
@ -135,13 +135,6 @@ public class DumpInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Getter
|
|
||||||
public static class HashInfo {
|
|
||||||
private final String md5Hash;
|
|
||||||
private final String sha256Hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public static class NetworkInfo {
|
public static class NetworkInfo {
|
||||||
private final boolean dockerCheck;
|
private final boolean dockerCheck;
|
||||||
@ -185,6 +178,24 @@ public class DumpInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public static class Floodgate {
|
||||||
|
private final Properties gitInfo;
|
||||||
|
private final Object config;
|
||||||
|
|
||||||
|
Floodgate() {
|
||||||
|
this.gitInfo = FloodgateGitPropertiesHolder.getGitProperties();
|
||||||
|
this.config = FloodgateConfigHolder.getConfig();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Getter
|
||||||
|
public static class HashInfo {
|
||||||
|
private final String md5Hash;
|
||||||
|
private final String sha256Hash;
|
||||||
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public static class RamInfo {
|
public static class RamInfo {
|
||||||
private final long free;
|
private final long free;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren