mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] ServerWrapper connect to ServerProfile
This commit is contained in:
parent
9841ef3157
commit
58dfc472ac
4 changed files with 7 additions and 4 deletions
|
@ -34,12 +34,12 @@ public void init(LaunchServer server) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canGetProfile(ClientProfile profile, Client client) {
|
public boolean canGetProfile(ClientProfile profile, Client client) {
|
||||||
return client.isAuth && client.username != null && (!profile.isLimited() || isWhitelisted("launchserver.profile.%s.show", profile, client) );
|
return !profile.isLimited() || isWhitelisted("launchserver.profile.%s.show", profile, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canChangeProfile(ClientProfile profile, Client client) {
|
public boolean canChangeProfile(ClientProfile profile, Client client) {
|
||||||
return client.isAuth && client.username != null && (!profile.isLimited() || isWhitelisted("launchserver.profile.%s.enter", profile, client) );
|
return !profile.isLimited() || isWhitelisted("launchserver.profile.%s.enter", profile, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -85,7 +85,8 @@ public boolean accept(Client client, AuthProviderPair pair, String extendedToken
|
||||||
client.auth_id = info.authId;
|
client.auth_id = info.authId;
|
||||||
client.auth = server.config.getAuthProviderPair(info.authId);
|
client.auth = server.config.getAuthProviderPair(info.authId);
|
||||||
if(client.permissions == null) client.permissions = new ClientPermissions();
|
if(client.permissions == null) client.permissions = new ClientPermissions();
|
||||||
client.permissions.addAction("launchserver\\.checkserver");
|
client.permissions.addAction("launchserver.checkserver");
|
||||||
|
client.permissions.addAction(String.format("launchserver.profiles.%s.show", info.serverName));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,8 @@ public class OptionalFile {
|
||||||
public int subTreeLevel = 1;
|
public int subTreeLevel = 1;
|
||||||
@LauncherNetworkAPI
|
@LauncherNetworkAPI
|
||||||
public boolean isPreset;
|
public boolean isPreset;
|
||||||
|
@LauncherNetworkAPI
|
||||||
|
public boolean limited;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
id 'org.openjfx.javafxplugin' version '0.0.10' apply false
|
id 'org.openjfx.javafxplugin' version '0.0.10' apply false
|
||||||
}
|
}
|
||||||
group = 'pro.gravit.launcher'
|
group = 'pro.gravit.launcher'
|
||||||
version = '5.2.2'
|
version = '5.2.3-SNAPSHOT'
|
||||||
|
|
||||||
apply from: 'props.gradle'
|
apply from: 'props.gradle'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue