/*
 * This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
 * at the root of this project for more details.
 */
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 org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.data.key.Keys;
import org.spongepowered.api.entity.living.player.User;
import org.spongepowered.api.text.Text;

import javax.annotation.Nullable;
import javax.inject.Inject;

public class VanishInfoProvider implements NucleusProvider.Permission {

    private final INucleusServiceCollection serviceCollection;

    @Inject
    public VanishInfoProvider(INucleusServiceCollection serviceCollection) {
        this.serviceCollection = serviceCollection;
    }

    @Override public String getCategory() {
        return "vanish";
    }

    @Override public String permission() {
        return VanishPermissions.VANISH_SEE;
    }

    @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());
    }
}

@@ -451,24 +451,109 @@
 usProvider;%0A
+import io.github.nucleuspowered.nucleus.services.interfaces.IMessageProviderService;%0A
 import org.s
@@ -1396,208 +1396,394 @@
     
-return this.serviceCollection.messageProvider().getMessageFor(source, %22seen.vanish%22,%0A                        %22loc:standard.yesno.%22 + Boolean.toString(user.get(Keys.VANISH).orElse(false)).toLowerCase()
+final IMessageProviderService providerService = this.serviceCollection.messageProvider();%0A        final String isVanished = Boolean.toString(user.get(Keys.VANISH).orElse(false));%0A        final String yesNo = providerService.getMessageString(%22standard.yesno.%22 + isVanished.toLowerCase());%0A        return this.serviceCollection.messageProvider().getMessageFor(source, %22seen.vanish%22, yesNo
 );%0A 

Fix yes/no location key for vanished on /seen