Skip to content

Commit

Permalink
Remove deprecated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Jul 29, 2024
1 parent d73de3f commit 217e78a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
import java.util.Locale;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.kyori.adventure.platform.modcommon.impl.LocaleHolderBridge;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.player.Player;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -67,19 +65,4 @@ interface Changed {
*/
void onLocaleChanged(final @NotNull ServerPlayer player, final @Nullable Locale newLocale);
}

/**
* Get the active locale for a player, either on the server or client sides.
*
* <p>Will return the system-wide default value if the player has no locale set.</p>
*
* @param player the source of the locale
* @return player locale
* @since 4.0.0
* @deprecated Use pointer instead, {@code player.get(Identity.LOCALE).orElse(Locale.getDefault())} on a server or client player
*/
@Deprecated(forRemoval = true, since = "5.3.0")
static @NotNull Locale locale(final @NotNull Player player) {
return player instanceof LocaleHolderBridge ? ((LocaleHolderBridge) player).adventure$locale() : Locale.getDefault();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ public final class ComponentArgumentType implements ArgumentType<Component> {
private static final ComponentArgumentType JSON_INSTANCE = new ComponentArgumentType(Format.JSON);
private static final ComponentArgumentType MINIMESSAGE_INSTANCE = new ComponentArgumentType(Format.MINIMESSAGE);

/**
* Get the argument type for component arguments.
*
* @return argument type instance
* @since 6.0.0
* @deprecated use {@link #json()} or {@link #miniMessage()} instead.
*/
@Deprecated(forRemoval = true, since = "5.1.0")
public static @NotNull ComponentArgumentType component() {
return JSON_INSTANCE;
}

/**
* Get the component from the provided context.
*
Expand Down

0 comments on commit 217e78a

Please sign in to comment.