Fix yes/no location key for vanished on /seen
Fixes
@@ -7,6 +7,7 @@ package io.github.nucleuspowered.nucleus.modules.vanish.infoprovider;
import io.github.nucleuspowered.nucleus.modules.vanish.VanishPermissions;
import io.github.nucleuspowered.nucleus.services.INucleusServiceCollection;
import io.github.nucleuspowered.nucleus.services.impl.playerinformation.NucleusProvider;
+import io.github.nucleuspowered.nucleus.services.interfaces.IMessageProviderService;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.data.key.Keys;
import org.spongepowered.api.entity.living.player.User;
@@ -35,7 +36,9 @@ public class VanishInfoProvider implements NucleusProvider.Permission {
@Nullable
@Override
public Text getText(User user, CommandSource source, INucleusServiceCollection serviceCollection) {
- return this.serviceCollection.messageProvider().getMessageFor(source, "seen.vanish",
- "loc:standard.yesno." + Boolean.toString(user.get(Keys.VANISH).orElse(false)).toLowerCase());
+ final IMessageProviderService providerService = this.serviceCollection.messageProvider();
+ final String isVanished = Boolean.toString(user.get(Keys.VANISH).orElse(false));
+ final String yesNo = providerService.getMessageString("standard.yesno." + isVanished.toLowerCase());
+ return this.serviceCollection.messageProvider().getMessageFor(source, "seen.vanish", yesNo);
}
}
