package com.namelessmc.plugin.common;

import net.kyori.adventure.audience.Audience;
import net.kyori.adventure.platform.AudienceProvider;
import org.jetbrains.annotations.NotNull;

import java.util.UUID;

/**
 * This is an "AbstractAudienceProvider" implementation using an "AudienceProvider" instance from adventure
 */
public class AudienceProviderAudienceProvider extends AbstractAudienceProvider {

	private final @NotNull AudienceProvider audienceProvider;

	public AudienceProviderAudienceProvider(final @NotNull AudienceProvider audienceProvider) {
		this.audienceProvider = audienceProvider;
	}

	@Override
	public Audience console() {
		return this.audienceProvider.all();
	}

	@Override
	public Audience all() {
		return this.audienceProvider.console();
	}

	@Override
	public Audience player(UUID uuid) {
		return this.audienceProvider.player(uuid);
	}

}

@@ -669,19 +669,23 @@
 rovider.
-all
+console
 ();%0A%09%7D%0A%0A
@@ -743,39 +743,35 @@
 udienceProvider.
-console
+all
 ();%0A%09%7D%0A%0A%09@Overri

swap console <-> all