mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Merge remote-tracking branch 'origin/floodgate-2.0' into feature/1.17
This commit is contained in:
commit
9568a3a866
2 changed files with 58 additions and 11 deletions
|
@ -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.floodgate.util.DeviceOs;
|
||||
import org.geysermc.floodgate.util.FloodgateConfigHolder;
|
||||
import org.geysermc.floodgate.util.FloodgateGitPropertiesHolder;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -60,9 +61,9 @@ public class DumpInfo {
|
|||
private final DumpInfo.VersionInfo versionInfo;
|
||||
private Properties gitInfo;
|
||||
private final GeyserConfiguration config;
|
||||
private final Object floodgateConfig;
|
||||
private final HashInfo hashInfo;
|
||||
private final Floodgate floodgate;
|
||||
private final Object2IntMap<DeviceOs> userPlatforms;
|
||||
private final HashInfo hashInfo;
|
||||
private final RamInfo ramInfo;
|
||||
private final BootstrapDumpInfo bootstrapInfo;
|
||||
|
||||
|
@ -76,7 +77,7 @@ public class DumpInfo {
|
|||
}
|
||||
|
||||
this.config = GeyserConnector.getInstance().getConfig();
|
||||
this.floodgateConfig = FloodgateConfigHolder.getConfig();
|
||||
this.floodgate = new Floodgate();
|
||||
|
||||
String md5Hash = "unknown";
|
||||
String sha256Hash = "unknown";
|
||||
|
@ -95,7 +96,6 @@ public class DumpInfo {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
this.hashInfo = new HashInfo(md5Hash, sha256Hash);
|
||||
|
||||
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
|
||||
public static class NetworkInfo {
|
||||
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
|
||||
public static class RamInfo {
|
||||
private final long free;
|
||||
|
|
Loading…
Reference in a new issue