[FEATURE] Запись protectToken d параметры wrapper'а

This commit is contained in:
Gravit 2019-03-14 23:56:43 +07:00
parent 37be6b86c3
commit dc2a978716
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
3 changed files with 7 additions and 3 deletions

View file

@ -46,6 +46,6 @@ public void addCustomEnv(ClientLauncherContext context) {
@Override @Override
public void setProtectToken(String token) { public void setProtectToken(String token) {
//Skip
} }
} }

View file

@ -43,6 +43,6 @@ public void addCustomEnv(ClientLauncherContext context) {
@Override @Override
public void setProtectToken(String token) { public void setProtectToken(String token) {
//Skip
} }
} }

View file

@ -13,6 +13,9 @@
import java.util.Map; import java.util.Map;
public class LauncherWrapperGuard implements LauncherGuardInterface { public class LauncherWrapperGuard implements LauncherGuardInterface {
public String protectToken;
@Override @Override
public String getName() { public String getName() {
return "wrapper"; return "wrapper";
@ -62,6 +65,7 @@ public void addCustomEnv(ClientLauncherContext context) {
env.put("GUARD_USERNAME", context.playerProfile.username); env.put("GUARD_USERNAME", context.playerProfile.username);
env.put("GUARD_PUBLICKEY", config.publicKey.getModulus().toString(16)); env.put("GUARD_PUBLICKEY", config.publicKey.getModulus().toString(16));
env.put("GUARD_PROJECTNAME", config.projectname); env.put("GUARD_PROJECTNAME", config.projectname);
env.put("GUARD_TOKEN", protectToken);
if(config.guardLicenseName != null) if(config.guardLicenseName != null)
env.put("GUARD_LICENSE_NAME", config.guardLicenseName); env.put("GUARD_LICENSE_NAME", config.guardLicenseName);
if(config.guardLicenseKey != null) if(config.guardLicenseKey != null)
@ -72,6 +76,6 @@ public void addCustomEnv(ClientLauncherContext context) {
@Override @Override
public void setProtectToken(String token) { public void setProtectToken(String token) {
protectToken = token;
} }
} }