This commit is contained in:
NotMyFault
2021-06-20 18:28:29 +02:00
12 changed files with 123 additions and 31 deletions

View File

@ -47,6 +47,7 @@ import com.plotsquared.core.plot.flag.implementations.DisablePhysicsFlag;
import com.plotsquared.core.plot.flag.implementations.DoneFlag;
import com.plotsquared.core.plot.flag.implementations.DropProtectionFlag;
import com.plotsquared.core.plot.flag.implementations.EntityCapFlag;
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;
@ -191,6 +192,7 @@ public final class GlobalFlagContainer extends FlagContainer {
this.addFlag(DenyPortalTravelFlag.DENY_PORTAL_TRAVEL_FALSE);
this.addFlag(DenyPortalsFlag.DENY_PORTALS_FALSE);
this.addFlag(LecternReadBookFlag.LECTERN_READ_BOOK_FALSE);
this.addFlag(EntityChangeBlockFlag.ENTITY_CHANGE_BLOCK_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 EntityChangeBlockFlag extends BooleanFlag<EntityChangeBlockFlag> {
public static final EntityChangeBlockFlag ENTITY_CHANGE_BLOCK_TRUE = new EntityChangeBlockFlag(true);
public static final EntityChangeBlockFlag ENTITY_CHANGE_BLOCK_FALSE = new EntityChangeBlockFlag(false);
private EntityChangeBlockFlag(boolean value) {
super(value, TranslatableCaption.of("flags.flag_description_entity_change_block"));
}
@Override
protected EntityChangeBlockFlag flagOf(@NonNull Boolean value) {
return value ? ENTITY_CHANGE_BLOCK_TRUE : ENTITY_CHANGE_BLOCK_FALSE;
}
}

View File

@ -565,6 +565,7 @@
"flags.flag_description_mob_break": "<gray>Set to `true` to allow mobs to break blocks within the plot.</gray>",
"flags.flag_description_mob_cap": "<gray>Set to an integer value to limit the amount of mobs on the plot.</gray>",
"flags.flag_description_mob_place": "<gray>Set to `true` to allow mobs to place blocks within the plot.</gray>",
"flags.flag_description_entity_change_block": "<gray>Set to `true` to allow entities to change blocks within the plot, if not covered by other flags.</gray>",
"flags.flag_description_mycel_grow": "<gray>Set to `false` to prevent mycelium from growing in the plot.</gray>",
"flags.flag_description_notify_enter": "<gray>Set to `true` to notify the plot owners when someone enters the plot.</gray>",
"flags.flag_description_notify_leave": "<gray>Set to `true` to notify the plot owners when someone leaves the plot.</gray>",