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.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
@ -14,7 +13,6 @@ import net.md_5.bungee.api.chat.ComponentBuilder.FormatRetention;
|
||||
@Setter
|
||||
@ToString(exclude = "parent")
|
||||
@EqualsAndHashCode(exclude = "parent")
|
||||
@NoArgsConstructor
|
||||
public abstract class BaseComponent
|
||||
{
|
||||
|
||||
@ -76,6 +74,16 @@ public abstract class BaseComponent
|
||||
@Getter
|
||||
private HoverEvent hoverEvent;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*
|
||||
* @deprecated for use by internal classes only, will be removed.
|
||||
*/
|
||||
@Deprecated
|
||||
public BaseComponent()
|
||||
{
|
||||
}
|
||||
|
||||
BaseComponent(BaseComponent old)
|
||||
{
|
||||
copyFormatting( old, FormatRetention.ALL, true );
|
||||
|
@ -44,7 +44,7 @@ public final class KeybindComponent extends BaseComponent
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseComponent duplicate()
|
||||
public KeybindComponent duplicate()
|
||||
{
|
||||
return new KeybindComponent( this );
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public final class TranslatableComponent extends BaseComponent
|
||||
* @return the duplicate of this TranslatableComponent.
|
||||
*/
|
||||
@Override
|
||||
public BaseComponent duplicate()
|
||||
public TranslatableComponent duplicate()
|
||||
{
|
||||
return new TranslatableComponent( this );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user