feat: introduce a fishing flag (#4343)

* introduce fishing flag

* fixed typo in description

* added details to the flags description
This commit is contained in:
Maurice
2024-03-02 13:43:16 +01:00
committed by GitHub
parent 68701b6201
commit 5344efd1b7
5 changed files with 57 additions and 1 deletions

View File

@ -48,6 +48,7 @@ import com.plotsquared.core.plot.flag.implementations.EntityChangeBlockFlag;
import com.plotsquared.core.plot.flag.implementations.ExplosionFlag;
import com.plotsquared.core.plot.flag.implementations.FarewellFlag;
import com.plotsquared.core.plot.flag.implementations.FeedFlag;
import com.plotsquared.core.plot.flag.implementations.FishingFlag;
import com.plotsquared.core.plot.flag.implementations.FlyFlag;
import com.plotsquared.core.plot.flag.implementations.ForcefieldFlag;
import com.plotsquared.core.plot.flag.implementations.GamemodeFlag;
@ -158,6 +159,7 @@ public final class GlobalFlagContainer extends FlagContainer {
this.addFlag(EditSignFlag.EDIT_SIGN_FALSE);
this.addFlag(EntityChangeBlockFlag.ENTITY_CHANGE_BLOCK_FALSE);
this.addFlag(ExplosionFlag.EXPLOSION_FALSE);
this.addFlag(FishingFlag.FISHING_FALSE);
this.addFlag(ForcefieldFlag.FORCEFIELD_FALSE);
this.addFlag(GrassGrowFlag.GRASS_GROW_TRUE);
this.addFlag(HangingBreakFlag.HANGING_BREAK_FALSE);

View File

@ -0,0 +1,39 @@
/*
* PlotSquared, a land and world management plugin for Minecraft.
* Copyright (C) IntellectualSites <https://intellectualsites.com>
* Copyright (C) IntellectualSites team and contributors
*
* 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 FishingFlag extends BooleanFlag<FishingFlag> {
public static final FishingFlag FISHING_TRUE = new FishingFlag(true);
public static final FishingFlag FISHING_FALSE = new FishingFlag(false);
private FishingFlag(boolean value) {
super(value, TranslatableCaption.of("flags.flag_description_fishing"));
}
@Override
protected FishingFlag flagOf(@NonNull final Boolean value) {
return value ? FISHING_TRUE : FISHING_FALSE;
}
}

View File

@ -559,6 +559,7 @@
"flags.flag_description_drop_protection": "<gray>Set to `true` to prevent dropped items from being picked up by non-members of the plot.</gray>",
"flags.flag_description_edit_sign": "<gray>Set to `true` to allow editing signs in the plot.</gray>",
"flags.flag_description_feed": "<gray>Specify an interval in seconds and an optional amount by which the players will be fed (amount is 1 by default).</gray>",
"flags.flag_description_fishing": "<gray>Set to `true` to allow guests to use a fishing rod in the plot.</gray>",
"flags.flag_description_forcefield": "<gray>Set to `true` to enable member forcefield in the plot.</gray>",
"flags.flag_description_grass_grow": "<gray>Set to `false` to prevent grass from growing within the plot.</gray>",
"flags.flag_description_hanging_break": "<gray>Set to `true` to allow guests to break hanging objects in the plot.</gray>",