mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-22 00:27:36 +01:00
- Set group to empty if permissions manager has no group support.
- edited comment for config node "permission.EnablePermissionCheck"
This commit is contained in:
parent
9726576907
commit
78708354e1
@ -87,7 +87,10 @@ public class PlayerDataStorage {
|
|||||||
public void saveData(Player player) {
|
public void saveData(Player player) {
|
||||||
String id = Utils.getUUIDorName(player);
|
String id = Utils.getUUIDorName(player);
|
||||||
Location location = spawnLoader.getPlayerLocationOrSpawn(player);
|
Location location = spawnLoader.getPlayerLocationOrSpawn(player);
|
||||||
String group = permissionsManager.getPrimaryGroup(player);
|
String group = "";
|
||||||
|
if (permissionsManager.hasGroupSupport()) {
|
||||||
|
group = permissionsManager.getPrimaryGroup(player);
|
||||||
|
}
|
||||||
boolean operator = player.isOp();
|
boolean operator = player.isOp();
|
||||||
boolean canFly = player.getAllowFlight();
|
boolean canFly = player.getAllowFlight();
|
||||||
float walkSpeed = player.getWalkSpeed();
|
float walkSpeed = player.getWalkSpeed();
|
||||||
|
@ -156,10 +156,9 @@ public class LimboCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void restoreGroup(Player player, String group) {
|
private void restoreGroup(Player player, String group) {
|
||||||
if (!settings.getProperty(PluginSettings.ENABLE_PERMISSION_CHECK)
|
if (!StringUtils.isEmpty(group) && permissionsManager.hasGroupSupport()
|
||||||
|| !permissionsManager.hasGroupSupport() || StringUtils.isEmpty(group)) {
|
&& settings.getProperty(PluginSettings.ENABLE_PERMISSION_CHECK)) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
permissionsManager.setGroup(player, group);
|
permissionsManager.setGroup(player, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -45,8 +45,8 @@ public class PluginSettings implements SettingsClass {
|
|||||||
newProperty("settings.messagesLanguage", "en");
|
newProperty("settings.messagesLanguage", "en");
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"Take care with this option; if you don't want",
|
"Take care with this option; if you want",
|
||||||
"to use Vault and group switching of AuthMe",
|
"to use group switching of AuthMe",
|
||||||
"for unloggedIn players, set this setting to true.",
|
"for unloggedIn players, set this setting to true.",
|
||||||
"Default is false."
|
"Default is false."
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user