Make all BaseComponent.duplicate methods specific
This commit is contained in:
parent
4e99a32537
commit
727281e69e
@ -5,7 +5,6 @@ import java.util.List;
|
|||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
@ -14,7 +13,6 @@ import net.md_5.bungee.api.chat.ComponentBuilder.FormatRetention;
|
|||||||
@Setter
|
@Setter
|
||||||
@ToString(exclude = "parent")
|
@ToString(exclude = "parent")
|
||||||
@EqualsAndHashCode(exclude = "parent")
|
@EqualsAndHashCode(exclude = "parent")
|
||||||
@NoArgsConstructor
|
|
||||||
public abstract class BaseComponent
|
public abstract class BaseComponent
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -76,6 +74,16 @@ public abstract class BaseComponent
|
|||||||
@Getter
|
@Getter
|
||||||
private HoverEvent hoverEvent;
|
private HoverEvent hoverEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default constructor.
|
||||||
|
*
|
||||||
|
* @deprecated for use by internal classes only, will be removed.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public BaseComponent()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
BaseComponent(BaseComponent old)
|
BaseComponent(BaseComponent old)
|
||||||
{
|
{
|
||||||
copyFormatting( old, FormatRetention.ALL, true );
|
copyFormatting( old, FormatRetention.ALL, true );
|
||||||
|
@ -44,7 +44,7 @@ public final class KeybindComponent extends BaseComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseComponent duplicate()
|
public KeybindComponent duplicate()
|
||||||
{
|
{
|
||||||
return new KeybindComponent( this );
|
return new KeybindComponent( this );
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ public final class TranslatableComponent extends BaseComponent
|
|||||||
* @return the duplicate of this TranslatableComponent.
|
* @return the duplicate of this TranslatableComponent.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public BaseComponent duplicate()
|
public TranslatableComponent duplicate()
|
||||||
{
|
{
|
||||||
return new TranslatableComponent( this );
|
return new TranslatableComponent( this );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user