mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
restore .setPlayerLocale API on bukkit manager
This was public, so cant remove it
This commit is contained in:
@@ -262,6 +262,10 @@ public class BukkitCommandManager extends CommandManager<
|
||||
return null;
|
||||
}
|
||||
|
||||
public Locale setPlayerLocale(Player player, Locale locale) {
|
||||
return this.setIssuerLocale(player, locale);
|
||||
}
|
||||
|
||||
void readPlayerLocale(Player player) {
|
||||
if (!player.isOnline() || cantReadLocale) {
|
||||
return;
|
||||
|
||||
@@ -196,7 +196,7 @@ public abstract class CommandManager <
|
||||
public abstract boolean hasRegisteredCommands();
|
||||
public abstract boolean isCommandIssuer(Class<?> type);
|
||||
|
||||
// TODO: Change this to I if we make a breaking change
|
||||
// TODO: Change this to IT if we make a breaking change
|
||||
public abstract I getCommandIssuer(Object issuer);
|
||||
|
||||
public abstract RootCommand createRootCommand(String cmd);
|
||||
|
||||
@@ -25,6 +25,7 @@ package co.aikar.commands;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.spongepowered.api.command.CommandSource;
|
||||
import org.spongepowered.api.command.source.ConsoleSource;
|
||||
import org.spongepowered.api.entity.living.player.Player;
|
||||
import org.spongepowered.api.text.serializer.TextSerializers;
|
||||
import org.spongepowered.api.util.Identifiable;
|
||||
@@ -55,7 +56,7 @@ public class SpongeCommandIssuer implements CommandIssuer {
|
||||
|
||||
@Override
|
||||
public @NotNull UUID getUniqueId() {
|
||||
if (isPlayer()) {
|
||||
if (this.source instanceof Identifiable) {
|
||||
return ((Identifiable) source).getUniqueId();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user