001/*
002 * PlotSquared, a land and world management plugin for Minecraft.
003 * Copyright (C) IntellectualSites <https://intellectualsites.com>
004 * Copyright (C) IntellectualSites team and contributors
005 *
006 * This program is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU General Public License as published by
008 * the Free Software Foundation, either version 3 of the License, or
009 * (at your option) any later version.
010 *
011 * This program is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
014 * GNU General Public License for more details.
015 *
016 * You should have received a copy of the GNU General Public License
017 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
018 */
019package com.plotsquared.core.plot;
020
021import org.checkerframework.checker.nullness.qual.Nullable;
022
023import java.util.Objects;
024
025public class PlotTitle {
026
027    /**
028     * @since 6.1.0
029     */
030    public static final PlotTitle CONFIGURED = new PlotTitle();
031
032    private final String title;
033    private final String subtitle;
034
035    private PlotTitle() {
036        title = null;
037        subtitle = null;
038    }
039
040    /**
041     * @since 6.0.10
042     */
043    public PlotTitle(String title, String subtitle) {
044        Objects.requireNonNull(title);
045        Objects.requireNonNull(subtitle);
046        this.title = title;
047        this.subtitle = subtitle;
048    }
049
050    /**
051     * @since 6.0.10
052     */
053    @Nullable
054    public String title() {
055        return title;
056    }
057
058    /**
059     * @since 6.0.10
060     */
061    @Nullable
062    public String subtitle() {
063        return subtitle;
064    }
065
066}