Add copper-oxide flag

This commit is contained in:
NotMyFault
2021-07-10 15:50:38 +02:00
parent b9cb6842e2
commit 635e18e7ed
4 changed files with 91 additions and 0 deletions

View File

@ -35,6 +35,7 @@ import com.plotsquared.core.plot.flag.implementations.BlockIgnitionFlag;
import com.plotsquared.core.plot.flag.implementations.BlockedCmdsFlag;
import com.plotsquared.core.plot.flag.implementations.BreakFlag;
import com.plotsquared.core.plot.flag.implementations.ChatFlag;
import com.plotsquared.core.plot.flag.implementations.CopperOxideFlag;
import com.plotsquared.core.plot.flag.implementations.CoralDryFlag;
import com.plotsquared.core.plot.flag.implementations.CropGrowFlag;
import com.plotsquared.core.plot.flag.implementations.DenyExitFlag;
@ -193,6 +194,7 @@ public final class GlobalFlagContainer extends FlagContainer {
this.addFlag(DenyPortalsFlag.DENY_PORTALS_FALSE);
this.addFlag(LecternReadBookFlag.LECTERN_READ_BOOK_FALSE);
this.addFlag(EntityChangeBlockFlag.ENTITY_CHANGE_BLOCK_FALSE);
this.addFlag(CopperOxideFlag.COPPER_OXIDE_FALSE);
// Enum Flags
this.addFlag(WeatherFlag.PLOT_WEATHER_FLAG_OFF);

View File

@ -0,0 +1,46 @@
/*
* _____ _ _ _____ _
* | __ \| | | | / ____| | |
* | |__) | | ___ | |_| (___ __ _ _ _ __ _ _ __ ___ __| |
* | ___/| |/ _ \| __|\___ \ / _` | | | |/ _` | '__/ _ \/ _` |
* | | | | (_) | |_ ____) | (_| | |_| | (_| | | | __/ (_| |
* |_| |_|\___/ \__|_____/ \__, |\__,_|\__,_|_| \___|\__,_|
* | |
* |_|
* PlotSquared plot management system for Minecraft
* Copyright (C) 2021 IntellectualSites
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.plotsquared.core.plot.flag.implementations;
import com.plotsquared.core.configuration.caption.TranslatableCaption;
import com.plotsquared.core.plot.flag.types.BooleanFlag;
import org.checkerframework.checker.nullness.qual.NonNull;
public class CopperOxideFlag extends BooleanFlag<CopperOxideFlag> {
public static final CopperOxideFlag COPPER_OXIDE_TRUE = new CopperOxideFlag(true);
public static final CopperOxideFlag COPPER_OXIDE_FALSE = new CopperOxideFlag(false);
private CopperOxideFlag(boolean value) {
super(value, TranslatableCaption.of("flags.flag_description_copper_oxide"));
}
@Override
protected CopperOxideFlag flagOf(@NonNull Boolean value) {
return value ? COPPER_OXIDE_TRUE : COPPER_OXIDE_FALSE;
}
}

View File

@ -575,6 +575,7 @@
"flags.flag_description_redstone": "<gray>Set to `false` to disable redstone in the plot.</gray>",
"flags.flag_description_server_plot": "<gray>Set to `true` to turn the plot into a server plot. This is equivalent to setting the server as the plot owner.</gray>",
"flags.flag_description_snow_form": "<gray>Set to `true` to allow snow to form within the plot.</gray>",
"flags.flag_description_copper_oxide": "<gray>Set to `true` to allow copper to oxide within the plot.</gray>",
"flags.flag_description_snow_melt": "<gray>Set to `true` to allow snow to melt within the plot.</gray>",
"flags.flag_description_soil_dry": "<gray>Set to `true` to allow soil to dry within the plot.</gray>",
"flags.flag_description_coral_dry": "<gray>Set to `true` to allow coral blocks to dry within the plot.</gray>",