Skip to content

Add missing StringRepresentable #2589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: api-14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package org.spongepowered.api.advancement;

import net.kyori.adventure.text.format.TextColor;
import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

Expand All @@ -33,7 +34,7 @@
* also the appearance in the notifications.
*/
@CatalogedBy(AdvancementTypes.class)
public interface AdvancementType extends DefaultedRegistryValue {
public interface AdvancementType extends DefaultedRegistryValue, StringRepresentable {

/**
* Gets the {@link TextColor} of the advancement type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Represents a color of dye that can be used by various items and blocks.
*/
@CatalogedBy(DyeColors.class)
public interface DyeColor extends DefaultedRegistryValue {
public interface DyeColor extends DefaultedRegistryValue, StringRepresentable {

/**
* Gets this dye color as a {@link Color} for easy translation.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/spongepowered/api/data/type/FoxType.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
* Represents a type of fox a fox is.
*/
@CatalogedBy(FoxTypes.class)
public interface FoxType extends DefaultedRegistryValue {
public interface FoxType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
* <p>The color of a horse is a genetic trait that can be inherited to a new born horse.</p>
*/
@CatalogedBy(HorseColors.class)
public interface HorseColor extends DefaultedRegistryValue {
public interface HorseColor extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(LlamaTypes.class)
public interface LlamaType extends DefaultedRegistryValue {
public interface LlamaType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
* Represents a type of mooshroom a mooshroom is.
*/
@CatalogedBy(MooshroomTypes.class)
public interface MooshroomType extends DefaultedRegistryValue {
public interface MooshroomType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Represents the type of panda a panda is.
*/
@CatalogedBy(PandaGenes.class)
public interface PandaGene extends DefaultedRegistryValue {
public interface PandaGene extends DefaultedRegistryValue, StringRepresentable {

boolean isRecessive();
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
* Represents the type of a {@link Parrot}.
*/
@CatalogedBy(ParrotTypes.class)
public interface ParrotType extends DefaultedRegistryValue {
public interface ParrotType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(PushReactions.class)
public interface PushReaction {
public interface PushReaction extends StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
* Represents a type of {@link Rabbit}.
*/
@CatalogedBy(RabbitTypes.class)
public interface RabbitType extends DefaultedRegistryValue {
public interface RabbitType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* <p>A TropicalFishShape represents both a fish's appearance and size.</p>
*/
@CatalogedBy(TropicalFishShapes.class)
public interface TropicalFishShape extends DefaultedRegistryValue {
public interface TropicalFishShape extends DefaultedRegistryValue, StringRepresentable {

/**
* Whether this shape represents a large {@link TropicalFish}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
package org.spongepowered.api.entity;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.entity.living.animal.Chicken;
import org.spongepowered.api.entity.living.monster.Creeper;
import org.spongepowered.api.entity.living.monster.zombie.Zombie;
Expand All @@ -38,7 +39,7 @@
* may include {@link Chicken}.
*/
@CatalogedBy(EntityCategories.class)
public interface EntityCategory extends DefaultedRegistryValue {
public interface EntityCategory extends DefaultedRegistryValue, StringRepresentable {

/**
* Whether this category of entities is considered "friendly".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
package org.spongepowered.api.entity.attribute;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

Expand All @@ -32,6 +33,6 @@
* {@link Attribute}.
*/
@CatalogedBy(AttributeOperations.class)
public interface AttributeOperation extends DefaultedRegistryValue {
public interface AttributeOperation extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
*/
package org.spongepowered.api.entity.display;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(BillboardTypes.class)
public interface BillboardType extends DefaultedRegistryValue {
public interface BillboardType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
*/
package org.spongepowered.api.entity.display;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(ItemDisplayTypes.class)
public interface ItemDisplayType extends DefaultedRegistryValue {
public interface ItemDisplayType extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
*/
package org.spongepowered.api.entity.display;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(TextAlignments.class)
public interface TextAlignment extends DefaultedRegistryValue {
public interface TextAlignment extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package org.spongepowered.api.entity.living.player.gamemode;

import net.kyori.adventure.text.ComponentLike;
import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;
Expand All @@ -33,6 +34,6 @@
* Represents a game mode that a {@link Player} may have.
*/
@CatalogedBy(GameModes.class)
public interface GameMode extends DefaultedRegistryValue, ComponentLike {
public interface GameMode extends DefaultedRegistryValue, ComponentLike, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
*/
package org.spongepowered.api.event.cause.entity.damage;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;


@CatalogedBy(DamageEffects.class)
public interface DamageEffect extends DefaultedRegistryValue {
public interface DamageEffect extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
*/
package org.spongepowered.api.event.cause.entity.damage;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;


@CatalogedBy(DamageScalings.class)
public interface DamageScaling extends DefaultedRegistryValue {
public interface DamageScaling extends DefaultedRegistryValue, StringRepresentable {

}
3 changes: 2 additions & 1 deletion src/main/java/org/spongepowered/api/item/FireworkShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
*/
package org.spongepowered.api.item;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

/**
* Represents a possible shape for a firework explosion.
*/
@CatalogedBy(FireworkShapes.class)
public interface FireworkShape extends DefaultedRegistryValue {
public interface FireworkShape extends DefaultedRegistryValue, StringRepresentable {

}
3 changes: 2 additions & 1 deletion src/main/java/org/spongepowered/api/item/ItemRarity.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
package org.spongepowered.api.item;

import net.kyori.adventure.text.format.TextColor;
import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.util.annotation.CatalogedBy;

/**
* The rarity of an item.
*/
@CatalogedBy(ItemRarities.class)
public interface ItemRarity {
public interface ItemRarity extends StringRepresentable {

/**
* Gets the {@link TextColor} used to decorate tooltips of items with this {@link ItemRarity}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@
*/
package org.spongepowered.api.item.inventory.equipment;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

/**
* Represents a equipment type.
*/
@CatalogedBy(EquipmentTypes.class)
public interface EquipmentType extends DefaultedRegistryValue {
public interface EquipmentType extends DefaultedRegistryValue, StringRepresentable {

/**
* Gets the {@link EquipmentGroup group} this equipment falls under.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import net.kyori.adventure.text.format.NamedTextColor;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.scoreboard.Team;
import org.spongepowered.api.util.annotation.CatalogedBy;
Expand All @@ -36,7 +37,7 @@
* Represents an area to display an objective.
*/
@CatalogedBy(DisplaySlots.class)
public interface DisplaySlot extends DefaultedRegistryValue {
public interface DisplaySlot extends DefaultedRegistryValue, StringRepresentable {

/**
* Finds and retrieves the sidebar display slot for the specified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
package org.spongepowered.api.scoreboard.objective.displaymode;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.scoreboard.objective.Objective;
import org.spongepowered.api.util.annotation.CatalogedBy;
Expand All @@ -32,6 +33,6 @@
* Represents the mode in which to display scores for an {@link Objective}.
*/
@CatalogedBy(ObjectiveDisplayModes.class)
public interface ObjectiveDisplayMode extends DefaultedRegistryValue {
public interface ObjectiveDisplayMode extends DefaultedRegistryValue, StringRepresentable {

}
3 changes: 2 additions & 1 deletion src/main/java/org/spongepowered/api/util/mirror/Mirror.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
*/
package org.spongepowered.api.util.mirror;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(Mirrors.class)
public interface Mirror extends DefaultedRegistryValue {
public interface Mirror extends DefaultedRegistryValue, StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
*/
package org.spongepowered.api.util.rotation;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.Angle;
import org.spongepowered.api.util.annotation.CatalogedBy;
import org.spongepowered.math.matrix.Matrix4d;

@CatalogedBy(Rotations.class)
public interface Rotation extends DefaultedRegistryValue {
public interface Rotation extends DefaultedRegistryValue, StringRepresentable {

Rotation and(final Rotation rotation);

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/spongepowered/api/world/HeightType.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
package org.spongepowered.api.world;

import org.spongepowered.api.block.BlockState;
import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.registry.DefaultedRegistryValue;
import org.spongepowered.api.util.BlockReaderAwareMatcher;
import org.spongepowered.api.util.annotation.CatalogedBy;

@CatalogedBy(HeightTypes.class)
public interface HeightType extends DefaultedRegistryValue {
public interface HeightType extends DefaultedRegistryValue, StringRepresentable {

BlockReaderAwareMatcher<BlockState> matcher();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
*/
package org.spongepowered.api.world.biome.climate;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.util.annotation.CatalogedBy;
import org.spongepowered.api.world.biome.Biome;

/**
* A modifier for grass color in a {@link Biome}
*/
@CatalogedBy(GrassColorModifiers.class)
public interface GrassColorModifier {
public interface GrassColorModifier extends StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
*/
package org.spongepowered.api.world.biome.climate;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.util.annotation.CatalogedBy;
import org.spongepowered.api.world.biome.Biome;

/**
* The type of precipitation in a {@link Biome}.
*/
@CatalogedBy(Precipitations.class)
public interface Precipitation {
public interface Precipitation extends StringRepresentable {

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
*/
package org.spongepowered.api.world.biome.climate;

import org.spongepowered.api.data.type.StringRepresentable;
import org.spongepowered.api.util.annotation.CatalogedBy;

/**
* The temperature modifier of a biome
*/
@CatalogedBy(TemperatureModifiers.class)
public interface TemperatureModifier {
public interface TemperatureModifier extends StringRepresentable {

}
Loading
Loading