Fix issue with loading tracks with configurate

This commit is contained in:
Luck
2017-11-20 15:14:44 +00:00
Unverified
parent cd0184970a
commit b3e78c6dc1
22 changed files with 53 additions and 47 deletions
@@ -222,7 +222,7 @@ public class SpongeMainCommand extends Command<Void, LPSubjectData> {
}
public List<Command<LPSubjectData, ?>> getSubCommands() {
return subCommands.values().stream().flatMap(List::stream).collect(ImmutableCollectors.toImmutableList());
return subCommands.values().stream().flatMap(List::stream).collect(ImmutableCollectors.toList());
}
@Override
@@ -221,7 +221,7 @@ public class SpongeGroupManager implements GroupManager, LPSubjectCollection {
@Override
public ImmutableCollection<LPSubject> getLoadedSubjects() {
return getAll().values().stream().map(SpongeGroup::sponge).collect(ImmutableCollectors.toImmutableSet());
return getAll().values().stream().map(SpongeGroup::sponge).collect(ImmutableCollectors.toSet());
}
@Override
@@ -267,7 +267,7 @@ public class SpongeGroupManager implements GroupManager, LPSubjectCollection {
.map(SpongeGroup::sponge)
.map(sub -> Maps.immutableEntry(sub, sub.getPermissionValue(ImmutableContextSet.empty(), permission)))
.filter(pair -> pair.getValue() != Tristate.UNDEFINED)
.collect(ImmutableCollectors.toImmutableMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
.collect(ImmutableCollectors.toMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
}
@Override
@@ -276,7 +276,7 @@ public class SpongeGroupManager implements GroupManager, LPSubjectCollection {
.map(SpongeGroup::sponge)
.map(sub -> Maps.immutableEntry(sub, sub.getPermissionValue(contexts, permission)))
.filter(pair -> pair.getValue() != Tristate.UNDEFINED)
.collect(ImmutableCollectors.toImmutableMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
.collect(ImmutableCollectors.toMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
}
@Override
@@ -311,7 +311,7 @@ public class SpongeUserManager implements UserManager, LPSubjectCollection {
@Override
public ImmutableCollection<LPSubject> getLoadedSubjects() {
return getAll().values().stream().map(SpongeUser::sponge).collect(ImmutableCollectors.toImmutableSet());
return getAll().values().stream().map(SpongeUser::sponge).collect(ImmutableCollectors.toSet());
}
@Override
@@ -364,7 +364,7 @@ public class SpongeUserManager implements UserManager, LPSubjectCollection {
.map(SpongeUser::sponge)
.map(sub -> Maps.immutableEntry(sub, sub.getPermissionValue(ImmutableContextSet.empty(), permission)))
.filter(pair -> pair.getValue() != Tristate.UNDEFINED)
.collect(ImmutableCollectors.toImmutableMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
.collect(ImmutableCollectors.toMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
}
@Override
@@ -373,7 +373,7 @@ public class SpongeUserManager implements UserManager, LPSubjectCollection {
.map(SpongeUser::sponge)
.map(sub -> Maps.immutableEntry(sub, sub.getPermissionValue(contexts, permission)))
.filter(pair -> pair.getValue() != Tristate.UNDEFINED)
.collect(ImmutableCollectors.toImmutableMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
.collect(ImmutableCollectors.toMap(Map.Entry::getKey, sub -> sub.getValue().asBoolean()));
}
@Override
@@ -130,13 +130,13 @@ public class PersistedCollection implements LPSubjectCollection {
@Override
public CompletableFuture<ImmutableMap<SubjectReference, Boolean>> getAllWithPermission(String permission) {
return CompletableFuture.completedFuture(getLoadedWithPermission(permission).entrySet().stream()
.collect(ImmutableCollectors.toImmutableMap(e -> e.getKey().toReference(), Map.Entry::getValue)));
.collect(ImmutableCollectors.toMap(e -> e.getKey().toReference(), Map.Entry::getValue)));
}
@Override
public CompletableFuture<ImmutableMap<SubjectReference, Boolean>> getAllWithPermission(ImmutableContextSet contexts, String permission) {
return CompletableFuture.completedFuture(getLoadedWithPermission(contexts, permission).entrySet().stream()
.collect(ImmutableCollectors.toImmutableMap(e -> e.getKey().toReference(), Map.Entry::getValue)));
.collect(ImmutableCollectors.toMap(e -> e.getKey().toReference(), Map.Entry::getValue)));
}
@Override