mirror of
https://github.com/bloodmc/GriefDefender.git
synced 2025-02-12 01:11:29 +01:00
Update for 1.5.9 release.
* Fix playerdata getting wrong accrued claim block value if world context existed while in global mode. * Fix Citizen NPC's being denied entry to claim when flag 'enter-claim' is false. * Fix some zh_HK translations. * Fix NPE during potion splash. * Fix enderman-grief flag definition. * Fix villager-trade flag definition. * Fix villager-farm flag definition. * Fix timing NPE in EntityEventHandler. * Fix owner name showing for enter/exit prefix in wilderness/admin claims. * Fix untamed animals being denied when attacking eachother. * Add 'claim-block-task' setting in global.conf to control whether block accrue task runs. * Add animal-block-modify flag definition. * Add ravager-block-break flag definition. * Add silverfish-block-infest flag definition. * Add new visual config setting 'cuboid-level-visuals-2d' under visual category to control whether cuboid visuals should be show during inspection of 2d claims with owner min/max level between 0-255. * Add ru_RU translations for new flag definitions. * Remove 'ForSale' click function in '/claiminfo' as it is no longer needed. * Rewrite EntityChangeBlockEvent handling. Handler will now use the proper block flag when handling source/target block changes. * (Sponge) Fix 'flowing_water' spam in gddebug. * (Sponge) Add ice form/melt detection. * (Sponge) Fix NPE in Nucleus listener. * (Sponge) Fix rent sign interval. * (Sponge) Fix compatibility with LittleTiles mod. * (Sponge) Fix inability to disable modification/investigation tool in config. * (Sponge) Fix some more debug spam during block pre event.
This commit is contained in:
parent
038e83d40d
commit
5ec34d4a17
@ -686,7 +686,7 @@ public void onEnable(boolean reload) {
|
||||
GriefDefenderPlugin.getGlobalConfig().save();
|
||||
}
|
||||
|
||||
if (!isEconomyModeEnabled() || GriefDefenderPlugin.getGlobalConfig().getConfig().economy.useClaimBlockTask) {
|
||||
if ((!isEconomyModeEnabled() && GriefDefenderPlugin.getGlobalConfig().getConfig().claim.claimBlockTask) || GriefDefenderPlugin.getGlobalConfig().getConfig().economy.useClaimBlockTask) {
|
||||
this.runningTasks.add(new ClaimBlockTask());
|
||||
}
|
||||
new PlayerTickTask();
|
||||
|
@ -184,6 +184,7 @@ public static MessageCache getInstance() {
|
||||
public Component ECONOMY_SIGN_SOLD_LINE4;
|
||||
public Component ECONOMY_VIRTUAL_NOT_SUPPORTED;
|
||||
public Component FEATURE_NOT_AVAILABLE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_ANIMAL_BLOCK_MODIFY;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_ARMOR_STAND_USE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_BLOCK_TRAMPLING;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_CHEST_ACCESS;
|
||||
@ -236,8 +237,10 @@ public static MessageCache getInstance() {
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_PISTON_ITEM_SPAWN;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_PISTON_USE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_PVP;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_RAVAGER_BLOCK_BREAK;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_RIDE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SLEEP;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SILVERFISH_BLOCK_INFEST;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SNOW_FALL;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SNOW_MELT;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SNOWMAN_TRAIL;
|
||||
@ -667,6 +670,7 @@ public void loadCache() {
|
||||
ECONOMY_SIGN_SOLD_LINE4 = MessageStorage.MESSAGE_DATA.getMessage("economy-sign-sold-line4");
|
||||
ECONOMY_VIRTUAL_NOT_SUPPORTED = MessageStorage.MESSAGE_DATA.getMessage("economy-virtual-not-supported");
|
||||
FEATURE_NOT_AVAILABLE = MessageStorage.MESSAGE_DATA.getMessage("feature-not-available");
|
||||
FLAG_DESCRIPTION_CUSTOM_ANIMAL_BLOCK_MODIFY = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-animal-block-modify");
|
||||
FLAG_DESCRIPTION_CUSTOM_ARMOR_STAND_USE = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-armorstand-use");
|
||||
FLAG_DESCRIPTION_CUSTOM_BLOCK_TRAMPLING = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-block-trampling");
|
||||
FLAG_DESCRIPTION_CUSTOM_CHEST_ACCESS = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-chest-access");
|
||||
@ -719,7 +723,9 @@ public void loadCache() {
|
||||
FLAG_DESCRIPTION_CUSTOM_PLAYER_TELEPORT_TO = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-player-teleport-to");
|
||||
FLAG_DESCRIPTION_CUSTOM_PLAYER_VILLAGER_DAMAGE = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-player-villager-damage");
|
||||
FLAG_DESCRIPTION_CUSTOM_PVP = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-pvp");
|
||||
FLAG_DESCRIPTION_CUSTOM_RAVAGER_BLOCK_BREAK = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-ravager-block-break");
|
||||
FLAG_DESCRIPTION_CUSTOM_RIDE = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-ride");
|
||||
FLAG_DESCRIPTION_CUSTOM_SILVERFISH_BLOCK_INFEST = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-silverfish-block-infest");
|
||||
FLAG_DESCRIPTION_CUSTOM_SLEEP = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-sleep");
|
||||
FLAG_DESCRIPTION_CUSTOM_SNOW_FALL = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-snow-fall");
|
||||
FLAG_DESCRIPTION_CUSTOM_SNOW_MELT = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-snow-melt");
|
||||
|
@ -317,19 +317,17 @@ public void execute(CommandSender src, String[] args) {
|
||||
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(Consumer -> { CommandHelper.displayClaimBankInfo(src, gdClaim, gdClaim.isTown() ? true : false, true); })))
|
||||
.build();
|
||||
}
|
||||
forSaleText = TextComponent.builder()
|
||||
TextComponent.Builder forSaleBuilder = TextComponent.builder()
|
||||
.append(MessageCache.getInstance().CLAIMINFO_UI_FOR_SALE.color(TextColor.YELLOW))
|
||||
.append(" : ")
|
||||
.append(getClickableInfoText(src, claim, FOR_SALE, claim.getEconomyData().isForSale() ? MessageCache.getInstance().LABEL_YES.color(TextColor.GREEN) : MessageCache.getInstance().LABEL_NO.color(TextColor.GRAY))).build();
|
||||
.append(claim.getEconomyData().isForSale() ? MessageCache.getInstance().LABEL_YES.color(TextColor.GREEN) : MessageCache.getInstance().LABEL_NO.color(TextColor.GRAY));
|
||||
if (claim.getEconomyData().isForSale()) {
|
||||
forSaleText = TextComponent.builder()
|
||||
.append(forSaleText)
|
||||
.append(" ")
|
||||
.append(MessageCache.getInstance().LABEL_PRICE.color(TextColor.YELLOW))
|
||||
.append(" : ")
|
||||
.append(String.valueOf(claim.getEconomyData().getSalePrice()), TextColor.GOLD)
|
||||
.build();
|
||||
forSaleBuilder.append(" ")
|
||||
.append(MessageCache.getInstance().LABEL_PRICE.color(TextColor.YELLOW))
|
||||
.append(" : ")
|
||||
.append(String.valueOf(claim.getEconomyData().getSalePrice()), TextColor.GOLD);
|
||||
}
|
||||
forSaleText = forSaleBuilder.build();
|
||||
}
|
||||
|
||||
Component claimId = TextComponent.builder()
|
||||
|
@ -46,6 +46,10 @@ public class ClaimCategory extends ConfigCategory {
|
||||
@Setting(value = "claim-block-task-move-threshold", comment = "The minimum threshold of movement (in blocks) required to receive accrued claim blocks. (Default: 0)"
|
||||
+ "\nNote: The claim block task runs every 5 minutes which is the time each player will get to move the required amount of blocks.")
|
||||
public int claimBlockTaskMoveThreshold = 0;
|
||||
@Setting(value = "claim-block-task", comment = "Whether claim block task should run to accrue blocks for players. (Default: True)"
|
||||
+ "\nNote: If in economy-mode, use setting 'use-claim-block-task' under economy category."
|
||||
+ "\nNote: To configure amount accrued, see 'blocks-accrued-per-hour' option at https://github.com/bloodmc/GriefDefender/wiki/Options-(Meta)#global-options")
|
||||
public boolean claimBlockTask = true;
|
||||
@Setting(value = "piston-protection-in-claims", comment = "Whether piston protection should be enabled within claims. Note: This does not affect pistons crossing into another claim, that is always protected. This only determines whether or not GD should process pistons if it doesn't cross into another claim.")
|
||||
public boolean pistonProtectionInClaims = false;
|
||||
@Setting(value = "auto-chest-claim-block-radius", comment = "Radius used (in blocks) for auto-created claim when a chest is placed. Set to -1 to disable chest claim creation.")
|
||||
|
@ -38,6 +38,10 @@ public class VisualCategory extends ConfigCategory {
|
||||
public boolean hideFillers = false;
|
||||
@Setting(value = "hide-wecui-drag-visuals-2d", comment = "Whether drag visuals should be shown while creating a claim in 2D mode.")
|
||||
public boolean hideDrag2d = true;
|
||||
@Setting(value = "cuboid-level-visuals-2d", comment = "Whether to use cuboid visuals, in 2D claims, during inspection with owner min/max claim levels between 0 and 255."
|
||||
+ "\nNote: WECUI visuals are not associated to this option."
|
||||
+ "\nNote: If enabled, this will send many block updates to players causing more client strain depending on size of claim. Use with caution.")
|
||||
public boolean cuboidLevelVisuals = false;
|
||||
@Setting(value = "client-visuals-per-tick", comment = "The amount of block visuals a client can receive per tick when showing/hiding claims. Default: 12")
|
||||
public int clientVisualsPerTick = 12;
|
||||
@Setting(value = "claim-create-block", comment = "The visual block used during claim creation. (Default: minecraft:diamond_block)")
|
||||
|
@ -115,6 +115,10 @@ public boolean onEntityMove(Event event, Location fromLocation, Location toLocat
|
||||
return true;
|
||||
}
|
||||
if (user != null) {
|
||||
if (user.getOnlinePlayer() == null) {
|
||||
// Most likely NPC, ignore
|
||||
return true;
|
||||
}
|
||||
if (user.getInternalPlayerData().trappedRequest) {
|
||||
GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().COMMAND_TRAPPED_CANCEL_MOVE);
|
||||
user.getInternalPlayerData().trappedRequest = false;
|
||||
@ -190,7 +194,7 @@ public boolean onEntityMove(Event event, Location fromLocation, Location toLocat
|
||||
TextComponent welcomeMessage = (TextComponent) gpEvent.getEnterMessage().orElse(null);
|
||||
if (welcomeMessage != null && !welcomeMessage.equals(TextComponent.empty()) && !fromClaim.isParent(toClaim)) {
|
||||
ChatType chatType = gpEvent.getEnterMessageChatType();
|
||||
final Component enterPrefix = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_ENTER, ImmutableMap.of(
|
||||
final Component enterPrefix = toClaim.isWilderness() || toClaim.isAdminClaim() ? GriefDefenderPlugin.GD_TEXT : MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_ENTER, ImmutableMap.of(
|
||||
"owner", toClaim.getOwnerDisplayName()));
|
||||
if (chatType == ChatTypes.ACTION_BAR) {
|
||||
TextAdapter.sendActionBar(player, TextComponent.builder("")
|
||||
@ -208,7 +212,7 @@ public boolean onEntityMove(Event event, Location fromLocation, Location toLocat
|
||||
Component farewellMessage = gpEvent.getExitMessage().orElse(null);
|
||||
if (farewellMessage != null && !farewellMessage.equals(TextComponent.empty()) && !toClaim.isParent(fromClaim)) {
|
||||
ChatType chatType = gpEvent.getExitMessageChatType();
|
||||
final Component exitPrefix = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_EXIT, ImmutableMap.of(
|
||||
final Component exitPrefix = fromClaim.isWilderness() || fromClaim.isAdminClaim() ? GriefDefenderPlugin.GD_TEXT : MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_EXIT, ImmutableMap.of(
|
||||
"owner", fromClaim.getOwnerDisplayName()));
|
||||
if (chatType == ChatTypes.ACTION_BAR) {
|
||||
TextAdapter.sendActionBar(player, TextComponent.builder("")
|
||||
|
@ -60,11 +60,13 @@
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.CreatureSpawner;
|
||||
import org.bukkit.entity.Animals;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.EnderCrystal;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -141,6 +143,21 @@ public void onEntityChangeBlockEvent(EntityChangeBlockEvent event) {
|
||||
}
|
||||
|
||||
final Block block = event.getBlock();
|
||||
final boolean sourceAir = NMSUtil.getInstance().isMaterialAir(block.getType());
|
||||
final boolean targetAir = NMSUtil.getInstance().isMaterialAir(event.getTo());
|
||||
if (sourceAir && targetAir) {
|
||||
return;
|
||||
}
|
||||
|
||||
Flag flag = null;
|
||||
if (sourceAir && !targetAir) {
|
||||
flag = Flags.BLOCK_PLACE;
|
||||
} else if (!sourceAir && targetAir) {
|
||||
flag = Flags.BLOCK_BREAK;
|
||||
} else {
|
||||
flag = Flags.BLOCK_MODIFY;
|
||||
}
|
||||
|
||||
final World world = event.getBlock().getWorld();
|
||||
if (!GriefDefenderPlugin.getInstance().claimsEnabledForWorld(world.getUID())) {
|
||||
return;
|
||||
@ -167,7 +184,21 @@ public void onEntityChangeBlockEvent(EntityChangeBlockEvent event) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, location, targetClaim, Flags.BLOCK_BREAK, event.getEntity(), event.getBlock(), user, TrustTypes.BUILDER, true);
|
||||
|
||||
Tristate result = Tristate.TRUE;
|
||||
if (flag == Flags.BLOCK_BREAK) {
|
||||
result = GDPermissionManager.getInstance().getFinalPermission(event, location, targetClaim, flag, event.getEntity(), event.getBlock(), user, TrustTypes.BUILDER, true);
|
||||
} else if (flag == Flags.BLOCK_PLACE) {
|
||||
result = GDPermissionManager.getInstance().getFinalPermission(event, location, targetClaim, flag, event.getEntity(), event.getTo(), user, TrustTypes.BUILDER, true);
|
||||
} else {
|
||||
// Check if entity can modify block
|
||||
result = GDPermissionManager.getInstance().getFinalPermission(event, location, targetClaim, flag, event.getEntity(), event.getBlock(), user, TrustTypes.BUILDER, true);
|
||||
if (result == Tristate.TRUE) {
|
||||
// Check if source block can be modified to new block
|
||||
result = GDPermissionManager.getInstance().getFinalPermission(event, location, targetClaim, flag, event.getBlock(), event.getTo(), user, TrustTypes.BUILDER, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (result == Tristate.FALSE) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -431,6 +462,10 @@ public void onEntityDamage(EntityDamageByEntityEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
// allow source/target animals to attack eachother
|
||||
if (event.getDamager() instanceof Animals && event.getEntity() instanceof Animals) {
|
||||
return;
|
||||
}
|
||||
GDTimings.ENTITY_DAMAGE_EVENT.startTiming();
|
||||
if (protectEntity(event, event.getDamager(), event.getEntity())) {
|
||||
event.setCancelled(true);
|
||||
@ -495,7 +530,7 @@ public boolean protectEntity(Event event, Object source, Entity targetEntity) {
|
||||
user = PermissionHolderCache.getInstance().getOrCreateUser(gdEntity.getOwnerUUID());
|
||||
}
|
||||
}
|
||||
if (user != null && user.getOnlinePlayer() != null && targetUser.getOnlinePlayer() != null) {
|
||||
if (user != null && user.getOnlinePlayer() != null && targetUser != null && targetUser.getOnlinePlayer() != null) {
|
||||
return this.getPvpProtectResult(event, claim, source, user, targetUser);
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ public class ContextGroupKeys {
|
||||
public static final String MISC = "#misc";
|
||||
public static final String MONSTER = "#monster";
|
||||
public static final String PET = "#pet";
|
||||
public static final String PLANTS = "#plants";
|
||||
public static final String POTION = "#potion";
|
||||
public static final String VEHICLE = "#vehicle";
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public class ContextGroups {
|
||||
public static final Context SOURCE_MISC = new Context(ContextKeys.SOURCE, ContextGroupKeys.MISC);
|
||||
public static final Context SOURCE_MONSTER = new Context(ContextKeys.SOURCE, ContextGroupKeys.MONSTER);
|
||||
public static final Context SOURCE_PET = new Context(ContextKeys.SOURCE, ContextGroupKeys.PET);
|
||||
public static final Context SOURCE_PLANTS = new Context(ContextKeys.SOURCE, ContextGroupKeys.PLANTS);
|
||||
public static final Context SOURCE_POTION = new Context(ContextKeys.SOURCE, ContextGroupKeys.POTION);
|
||||
public static final Context SOURCE_VEHICLE = new Context(ContextKeys.SOURCE, ContextGroupKeys.VEHICLE);
|
||||
public static final Context TARGET_ANY = new Context(ContextKeys.TARGET, ContextGroupKeys.ANY);
|
||||
@ -50,6 +51,7 @@ public class ContextGroups {
|
||||
public static final Context TARGET_MISC = new Context(ContextKeys.TARGET, ContextGroupKeys.MISC);
|
||||
public static final Context TARGET_MONSTER = new Context(ContextKeys.TARGET, ContextGroupKeys.MONSTER);
|
||||
public static final Context TARGET_PET = new Context(ContextKeys.TARGET, ContextGroupKeys.PET);
|
||||
public static final Context TARGET_PLANTS = new Context(ContextKeys.TARGET, ContextGroupKeys.PLANTS);
|
||||
public static final Context TARGET_POTION = new Context(ContextKeys.TARGET, ContextGroupKeys.POTION);
|
||||
public static final Context TARGET_VEHICLE = new Context(ContextKeys.TARGET, ContextGroupKeys.VEHICLE);
|
||||
|
||||
|
@ -101,6 +101,7 @@
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerBucketEvent;
|
||||
@ -210,6 +211,10 @@ public Tristate getFinalPermission(Event event, Location location, Set<Context>
|
||||
// this allows users to block all pvp actions when direct source isn't a player
|
||||
contexts.add(new Context(ContextKeys.SOURCE, this.getPermissionIdentifier(user.getOnlinePlayer())));
|
||||
}
|
||||
if (source instanceof Block && event instanceof EntityChangeBlockEvent && flag == Flags.BLOCK_MODIFY) {
|
||||
final EntityChangeBlockEvent entityChangeBlockEvent = (EntityChangeBlockEvent) event;
|
||||
contexts.add(new Context(ContextKeys.SOURCE, this.getPermissionIdentifier(entityChangeBlockEvent.getEntity())));
|
||||
}
|
||||
|
||||
final Set<Context> sourceContexts = this.getPermissionContexts((GDClaim) claim, source, true);
|
||||
if (sourceContexts == null) {
|
||||
@ -759,7 +764,7 @@ public Set<Context> getPermissionContexts(GDClaim claim, Object obj, boolean isS
|
||||
|
||||
return populateEventSourceTargetContext(contexts, id, isSource);
|
||||
} else if (obj instanceof Material) {
|
||||
final String id = ((Material) obj).name().toLowerCase();
|
||||
final String id = BlockTypeRegistryModule.getInstance().getNMSKey((Material) obj);
|
||||
return populateEventSourceTargetContext(contexts, id, isSource);
|
||||
} else if (obj instanceof Inventory) {
|
||||
final String id = ((Inventory) obj).getType().name().toLowerCase();
|
||||
@ -1202,6 +1207,12 @@ private Set<Context> addBlockContexts(Set<Context> contexts, Block block, boolea
|
||||
} else {
|
||||
contexts.add(ContextGroups.TARGET_CROPS);
|
||||
}
|
||||
} else if (NMSUtil.getInstance().isBlockPlant(block)){
|
||||
if (isSource) {
|
||||
contexts.add(ContextGroups.SOURCE_PLANTS);
|
||||
} else {
|
||||
contexts.add(ContextGroups.TARGET_PLANTS);
|
||||
}
|
||||
}
|
||||
return contexts;
|
||||
}
|
||||
@ -1475,8 +1486,10 @@ public <T> T getInternalOptionValue(TypeToken<T> type, GDPermissionHolder holder
|
||||
if (holder != GriefDefenderPlugin.DEFAULT_HOLDER && holder instanceof GDPermissionUser) {
|
||||
final GDPermissionUser user = (GDPermissionUser) holder;
|
||||
final GDPlayerData playerData = (GDPlayerData) user.getPlayerData();
|
||||
//contexts.addAll(PermissionUtil.getInstance().getActiveContexts(holder));
|
||||
PermissionUtil.getInstance().addActiveContexts(contexts, holder, playerData, claim);
|
||||
// Prevent world contexts being added when checking for accrued blocks in global mode
|
||||
if (option != Options.ACCRUED_BLOCKS || GriefDefenderPlugin.getGlobalConfig().getConfig().playerdata.useWorldPlayerData()) {
|
||||
PermissionUtil.getInstance().addActiveContexts(contexts, holder, playerData, claim);
|
||||
}
|
||||
}
|
||||
|
||||
Set<Context> optionContexts = new HashSet<>(contexts);
|
||||
|
@ -51,12 +51,15 @@ public class FlagContexts {
|
||||
public static final Context SOURCE_PISTON = new Context(ContextKeys.SOURCE, "minecraft:piston");
|
||||
public static final Context SOURCE_PISTON_STICKY = new Context(ContextKeys.SOURCE, "minecraft:sticky_piston");
|
||||
public static final Context SOURCE_PLAYER = new Context(ContextKeys.SOURCE, "minecraft:player");
|
||||
public static final Context SOURCE_RAVAGER = new Context(ContextKeys.SOURCE, "minecraft:ravager");
|
||||
public static final Context SOURCE_SILVERFISH = new Context(ContextKeys.SOURCE, "minecraft:silverfish");
|
||||
public static final Context SOURCE_SNOW = new Context(ContextKeys.SOURCE, "minecraft:snow");
|
||||
public static final Context SOURCE_SNOW_1_12 = new Context(ContextKeys.SOURCE, "minecraft:snow_layer");
|
||||
public static final Context SOURCE_SNOWMAN = new Context(ContextKeys.SOURCE, "minecraft:snow_golem");
|
||||
public static final Context SOURCE_SNOWMAN_1_12 = new Context(ContextKeys.SOURCE, "minecraft:snowman");
|
||||
public static final Context SOURCE_TNT = new Context(ContextKeys.SOURCE, "minecraft:tnt");
|
||||
public static final Context SOURCE_TURTLE_EGG = new Context(ContextKeys.SOURCE, "minecraft:turtle_egg");
|
||||
public static final Context SOURCE_TYPE_ANIMAL = new Context(ContextKeys.SOURCE, "#animal");
|
||||
public static final Context SOURCE_TYPE_MONSTER = new Context(ContextKeys.SOURCE, "#monster");
|
||||
public static final Context SOURCE_WATER = new Context(ContextKeys.SOURCE, "minecraft:water");
|
||||
public static final Context SOURCE_WATER_1_12 = new Context(ContextKeys.SOURCE, "minecraft:flowing_water");
|
||||
|
@ -103,6 +103,24 @@ public void registerDefaults() {
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_TYPE_ANIMAL);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("animal-block-modify")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_ANIMAL_BLOCK_MODIFY)
|
||||
.group("admin")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_MODIFY)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.TARGET_TYPE_ANIMAL);
|
||||
this.registerCustomType(
|
||||
@ -974,6 +992,42 @@ public void registerDefaults() {
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_RAVAGER);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("ravager-block-break")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_RAVAGER_BLOCK_BREAK)
|
||||
.group("admin")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_SILVERFISH);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("silverfish-block-infest")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.FALSE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_SILVERFISH_BLOCK_INFEST)
|
||||
.group("admin")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_MODIFY)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_TNT);
|
||||
this.registerCustomType(
|
||||
@ -1031,27 +1085,6 @@ public void registerDefaults() {
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_PLAYER);
|
||||
flagContexts.add(FlagContexts.TARGET_VILLAGER);
|
||||
flagData = new ArrayList<>();
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.INTERACT_ENTITY_SECONDARY)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("villager-farm")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_VILLAGER_FARM)
|
||||
.group("admin")
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_WITHER);
|
||||
this.registerCustomType(
|
||||
@ -1100,6 +1133,11 @@ public void registerDefaults() {
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_PLACE)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
@ -1112,6 +1150,27 @@ public void registerDefaults() {
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_PLAYER);
|
||||
flagContexts.add(FlagContexts.TARGET_VILLAGER);
|
||||
flagData = new ArrayList<>();
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.INTERACT_ENTITY_SECONDARY)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("villager-trade")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_VILLAGER_TRADE)
|
||||
.group("admin")
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
// USER
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.TARGET_FARMLAND);
|
||||
@ -1203,6 +1262,17 @@ public void registerDefaults() {
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_ENDERMAN);
|
||||
flagData = new ArrayList<>();
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_PLACE)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
@ -1212,11 +1282,7 @@ public void registerDefaults() {
|
||||
.defaultValue(Tristate.FALSE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_ENDERMAN_GRIEF)
|
||||
.group("user")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
|
@ -61,7 +61,7 @@ public void run() {
|
||||
Location lastLocation = playerData.lastAfkCheckLocation;
|
||||
// if he's not in a vehicle and has moved at least three blocks since the last check and he's not being pushed around by fluids
|
||||
if (player.getVehicle() == null &&
|
||||
(lastLocation == null || lastLocation.getWorld() != player.getWorld() || lastLocation.distanceSquared(player.getLocation()) > (blockMoveThreshold * blockMoveThreshold)) &&
|
||||
(lastLocation == null || lastLocation.getWorld() != player.getWorld() || lastLocation.distanceSquared(player.getLocation()) >= (blockMoveThreshold * blockMoveThreshold)) &&
|
||||
!NMSUtil.getInstance().isBlockWater(player.getLocation().getBlock())) {
|
||||
int accruedBlocks = playerData.getBlocksAccruedPerHour() / 12;
|
||||
if (accruedBlocks < 0) {
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.12.2",
|
||||
"sha1": "d1b3379cf4cdcd5139bcb7fd417620d579723712",
|
||||
"path": "com/griefdefender/adapter/1.12.2-SNAPSHOT/adapter-1.12.2-20201225.210504-58.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.12.2-SNAPSHOT/adapter-1.12.2-20201225.210504-58.jar"
|
||||
"sha1": "a2dc91c2f88c19743fd0ae0a56fd5a66807be23b",
|
||||
"path": "com/griefdefender/adapter/1.12.2-SNAPSHOT/adapter-1.12.2-20210101.002548-59.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.12.2-SNAPSHOT/adapter-1.12.2-20210101.002548-59.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.13.2",
|
||||
"sha1": "fcdfe1435f7eb284dc0907361a382d5fc5a07a12",
|
||||
"path": "com/griefdefender/adapter/1.13.2-SNAPSHOT/adapter-1.13.2-20201225.210252-56.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.13.2-SNAPSHOT/adapter-1.13.2-20201225.210252-56.jar"
|
||||
"sha1": "909b2226df074a8a557eff3807527704dfcc7c1a",
|
||||
"path": "com/griefdefender/adapter/1.13.2-SNAPSHOT/adapter-1.13.2-20210101.002246-57.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.13.2-SNAPSHOT/adapter-1.13.2-20210101.002246-57.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.14.2",
|
||||
"sha1": "7390890a4f53a505c5c2c32f5c5fd2eb691733e2",
|
||||
"path": "com/griefdefender/adapter/1.14.2-SNAPSHOT/adapter-1.14.2-20201225.210140-56.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.14.2-SNAPSHOT/adapter-1.14.2-20201225.210140-56.jar"
|
||||
"sha1": "d23791e720f7f225c469d10cbde04ea972f8f725",
|
||||
"path": "com/griefdefender/adapter/1.14.2-SNAPSHOT/adapter-1.14.2-20210101.004044-57.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.14.2-SNAPSHOT/adapter-1.14.2-20210101.004044-57.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.14.3",
|
||||
"sha1": "8e41908935add10c5694178aa6c10eb50038505d",
|
||||
"path": "com/griefdefender/adapter/1.14.3-SNAPSHOT/adapter-1.14.3-20201225.210055-58.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.14.3-SNAPSHOT/adapter-1.14.3-20201225.210055-58.jar"
|
||||
"sha1": "b583a2b1478f6cceddd73f7537c567dddef88269",
|
||||
"path": "com/griefdefender/adapter/1.14.3-SNAPSHOT/adapter-1.14.3-20210101.001718-59.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.14.3-SNAPSHOT/adapter-1.14.3-20210101.001718-59.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.14.4",
|
||||
"sha1": "6fc337456f0eec6973202def3dad064f1b8bd8fe",
|
||||
"path": "com/griefdefender/adapter/1.14.4-SNAPSHOT/adapter-1.14.4-20201225.210006-56.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.14.4-SNAPSHOT/adapter-1.14.4-20201225.210006-56.jar"
|
||||
"sha1": "f198c2d3284df26b37f8bebde06c52c25adc497f",
|
||||
"path": "com/griefdefender/adapter/1.14.4-SNAPSHOT/adapter-1.14.4-20210101.001540-57.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.14.4-SNAPSHOT/adapter-1.14.4-20210101.001540-57.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.15.2",
|
||||
"sha1": "f125777d9cdd159880fdd78b04b8fbbc309d4545",
|
||||
"path": "com/griefdefender/adapter/1.15.2-SNAPSHOT/adapter-1.15.2-20201225.205838-39.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.15.2-SNAPSHOT/adapter-1.15.2-20201225.205838-39.jar"
|
||||
"sha1": "4130d6349f5d666bca4bb7663debb3ee0facbfaa",
|
||||
"path": "com/griefdefender/adapter/1.15.2-SNAPSHOT/adapter-1.15.2-20210101.001123-40.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.15.2-SNAPSHOT/adapter-1.15.2-20210101.001123-40.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.15",
|
||||
"sha1": "bb29813485bc3eb996d0ac4c5a0b502650bd45f8",
|
||||
"path": "com/griefdefender/adapter/1.15-SNAPSHOT/adapter-1.15-20201225.205921-39.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.15-SNAPSHOT/adapter-1.15-20201225.205921-39.jar"
|
||||
"sha1": "278cacea6b2e11f208085e95bc3e5cae23cb47e6",
|
||||
"path": "com/griefdefender/adapter/1.15-SNAPSHOT/adapter-1.15-20210101.001354-40.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.15-SNAPSHOT/adapter-1.15-20210101.001354-40.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.16.1",
|
||||
"sha1": "0e0279314fdeface60813c6af1f4023a9dc2e2c5",
|
||||
"path": "com/griefdefender/adapter/1.16.1-SNAPSHOT/adapter-1.16.1-20201225.205743-20.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.16.1-SNAPSHOT/adapter-1.16.1-20201225.205743-20.jar"
|
||||
"sha1": "35ca9f23b6258d4d519657c38a33861734312cba",
|
||||
"path": "com/griefdefender/adapter/1.16.1-SNAPSHOT/adapter-1.16.1-20210101.000900-21.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.16.1-SNAPSHOT/adapter-1.16.1-20210101.000900-21.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.16.2",
|
||||
"sha1": "59c6ed7ea54a5ca973beafc39788fc5c772ca2eb",
|
||||
"path": "com/griefdefender/adapter/1.16.2-SNAPSHOT/adapter-1.16.2-20201225.205647-13.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.16.2-SNAPSHOT/adapter-1.16.2-20201225.205647-13.jar"
|
||||
"sha1": "2120729220d0a9d834398759a8bd5b85aaae0908",
|
||||
"path": "com/griefdefender/adapter/1.16.2-SNAPSHOT/adapter-1.16.2-20210101.000516-14.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.16.2-SNAPSHOT/adapter-1.16.2-20210101.000516-14.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.16.4",
|
||||
"sha1": "d7feea3d2055644f1f33c3364f340f846803539a",
|
||||
"path": "com/griefdefender/adapter/1.16.4-SNAPSHOT/adapter-1.16.4-20201225.205541-14.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.16.4-SNAPSHOT/adapter-1.16.4-20201225.205541-14.jar"
|
||||
"sha1": "839c9998f0baf77155a7adf3a693117649253b8d",
|
||||
"path": "com/griefdefender/adapter/1.16.4-SNAPSHOT/adapter-1.16.4-20210101.000151-15.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.16.4-SNAPSHOT/adapter-1.16.4-20210101.000151-15.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter:1.8.8",
|
||||
"sha1": "51648172a2eb09cafec0cc1ff1d1917a812e1e3a",
|
||||
"path": "com/griefdefender/adapter/1.8.8-SNAPSHOT/adapter-1.8.8-20201225.210622-56.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.8.8-SNAPSHOT/adapter-1.8.8-20201225.210622-56.jar"
|
||||
"sha1": "f26ea115bb8b504e4ec448a16008f1ec46d0f1d3",
|
||||
"path": "com/griefdefender/adapter/1.8.8-SNAPSHOT/adapter-1.8.8-20210101.002757-57.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter/1.8.8-SNAPSHOT/adapter-1.8.8-20210101.002757-57.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
@ -3,5 +3,5 @@ main: com.griefdefender.GDBootstrap
|
||||
softdepend: [dynmap, PlaceholderAPI, WorldEdit, WorldGuard, Vault]
|
||||
depend: [LuckPerms]
|
||||
load: STARTUP
|
||||
version: '1.5.6'
|
||||
version: '1.5.9'
|
||||
api-version: 1.13
|
||||
|
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="Kontrolliert, ob eine Entität mit einer anderen kollidieren kann.\n&dBeispiel&f : Um das Kollidieren mit Rahmen zu verhindern, nutze\n&a/cf collide-entity minecraft:item_frame false\n&bNote&f : minecraft steht für die ModID und item_frame für die BlockID.\nGibst du keine ModID an, wird standardmäßig minecraft benutzt."
|
||||
flag-description-command-execute="Kontrolliert, ob ein Befehl ausgeführt werden kann.\n&dBeispiel&f : Um den Pixelmon Befehl '/shop select' zu blockieren, nutze\n&a/cf command-execute pixelmon:shop[select] false\n&bNote&f : &o&6pixelmon&f steht für die ModID &o&6shop&f für den Befehl und &o&6select&f für das Argument.\nGibst du keine ModID an, wird standardmäßig minecraft benutzt."
|
||||
flag-description-command-execute-pvp="Kontrolliert, ob ein Befehl während PvP benutzt werden kann.\n&dBeispiel&f : Um den Pixelmon Befehl '/shop select' zu blockieren, nutze\n&a/cf command-execute pixelmon:shop[select] false\n&bBeispiel&f : &o&6pixelmon&f steht für die ModID &o&6shop&f für den Befehl und &o&6select&f für das Argument.\nGibst du keine ModID an, wird standardmäßig minecraft benutzt."
|
||||
flag-description-custom-animal-block-modify="Legt fest, ob Tiere Blöcke modifizieren können."
|
||||
flag-description-custom-armorstand-use="Controls whether armorstands can be placed or broken."
|
||||
flag-description-custom-block-trampling="Kontrolliert, ob Acker-/Farmland und Eier von Schildkröten zertrampelt werden können."
|
||||
flag-description-custom-build="Kontrolliert, ob Aktionen mit Blöcken möglich sind, wie Abbauen, Platzieren und Interagieren."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="Kontrolliert, ob sich Spieler zu diesem Grundstück teleportieren können."
|
||||
flag-description-custom-player-villager-damage="Kontrolliert, ob Spieler Villagern Schaden zufügen können."
|
||||
flag-description-custom-pvp="Kontrolliert, ob PVP erlaubt ist."
|
||||
flag-description-custom-ravager-block-break="Legt fest, ob Verwüster während eines Pillager Raids Blöcke zerstören können."
|
||||
flag-description-custom-ride="Kontrolliert, ob das Aufsitzen und Fortbewegen mit Tieren und Fortbewegungsmitteln möglich ist."
|
||||
flag-description-custom-silverfish-block-infest="Legt fest, ob Silberfische Blöcke, beispielsweise Steine, infizieren können."
|
||||
flag-description-custom-sleep="Kontrolliert, ob Spieler in Betten schlafen können."
|
||||
flag-description-custom-snow-fall="Kontrolliert, ob Schnee fällt."
|
||||
flag-description-custom-snow-melt="Kontrolliert, ob Schnee schmilzt."
|
||||
|
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="Controls whether an entity can collide with an entity.\n&dExample&f : To prevent entity collisions with item frames, enter\n&a/cf collide-entity minecraft:item_frame false\n&bNote&f : minecraft represents the modid and item_frame represents the entity id.\nSpecifying no modid will always default to minecraft."
|
||||
flag-description-command-execute="Controls whether a command can be executed.\n&dExample&f : To prevent pixelmon's command '/shop select' from being run, enter\n&a/cf command-execute pixelmon:shop[select] false\n&bNote&f : &o&6pixelmon&f represents the modid and &o&6shop&f represents the base command, and &o&6select&f represents the argument.\nSpecifying no modid will always default to minecraft."
|
||||
flag-description-command-execute-pvp="Controls whether a command can be executed while engaged in PvP.\n&dExample&f : To prevent pixelmon's command '/shop select' from being run, enter\n&a/cf command-execute pixelmon:shop[select] false\n&bNote&f : &o&6pixelmon&f represents the modid and &o&6shop&f represents the base command, and &o&6select&f represents the argument.\nSpecifying no modid will always default to minecraft."
|
||||
flag-description-custom-animal-block-modify="Controls whether animals can modify blocks."
|
||||
flag-description-custom-armorstand-use="Controls whether armorstands can be placed or broken."
|
||||
flag-description-custom-block-trampling="Controls whether farmland and turtle eggs can be trampled."
|
||||
flag-description-custom-build="Controls whether actions are allowed against blocks and entities such as mining, placement, and interactions."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="Controls whether players can teleport to this claim."
|
||||
flag-description-custom-player-villager-damage="Controls whether players can deal damage to villagers."
|
||||
flag-description-custom-pvp="Controls whether PvP combat is allowed."
|
||||
flag-description-custom-ravager-block-break="Controls whether ravagers can break blocks during raids."
|
||||
flag-description-custom-ride="Controls whether vehicles(including animals) can be mounted."
|
||||
flag-description-custom-silverfish-block-infest="Controls whether silverfish can infest blocks such as cobblestone."
|
||||
flag-description-custom-sleep="Controls whether players can sleep in beds."
|
||||
flag-description-custom-snow-fall="Controls whether snow can fall."
|
||||
flag-description-custom-snow-melt="Controls whether snow can melt."
|
||||
|
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="Controla si una entidad puede COLISIONAR con otra entidad.\n&2&lEJEMPLO: &aPara prevenir colisionar con item frames, usa...\n&6&o'/cf collide-entity minecraft:item_frame &c&ofalse&6&o'\n&4&l[NOTA] &6&o'minecraft'&f&l=&d&lModID&f&l / &6&o'item_frame'&f&l=&d&lEntityID.\n&aSin especificar el &d&lModID &asiempre será por default &6&o'minecraft'&a."
|
||||
flag-description-command-execute="Controlar si un comando puede ser EJECUTADO.\n&2&lEJEMPLO: &aPara prevenir que los jugadores usen el comando &6&o'/sethome'&a, usa...\n&6&o'/cf command-execute nucleus:sethome &c&ofalse&6&o'\n&4&l[NOTA] &6&o'nucleus'&f&l=&d&lPluginID&f&l / &6&o'sethome'&f&l=&d&lBaseCommand\n&aSin especificar el &d&lPluginID &asiempre será por default &6&o'minecraft'&a."
|
||||
flag-description-command-execute-pvp="Controla si un comando puede ser EJECUTADO.\n&2&lEJEMPLO: &aPara prevenir que los jugadores usen el comando &6&o'/home'&a durante una pelea, usa...\n&6&o'/cf command-execute nucleus:home &c&ofalse&6&o'\n&4&l[NOTA] &6&o'nucleus'&f&l=&d&lPluginID&f&l / &6&o'home'&f&l=&d&lBaseCommand\n&aSin especificar el &d&lPluginID &asiempre será por default &6&o'minecraft'&a."
|
||||
flag-description-custom-animal-block-modify="Controla si los animales pueden modificar bloques."
|
||||
flag-description-custom-armorstand-use="Controla si los soportes de armaduras pueden ser colocados o destruidos."
|
||||
flag-description-custom-block-trampling="Controla si los bloques, como la Tierra para Cultivo (Farmland) o los huevos de Tortuga pueden ser dañados al pisarse."
|
||||
flag-description-custom-build="Controla si cualquier acción está permitida contra bloques y entidades como por ejemplo, minar, colocar, interactuar."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="Controla si los jugadores pueden teletransportarse a este terreno."
|
||||
flag-description-custom-player-villager-damage="Controla si los jugadores pueden causar daño a los aldeanos."
|
||||
flag-description-custom-pvp="Controla si el combate PvP está permitido."
|
||||
flag-description-custom-ravager-block-break="Controla si los ravagers pueden romper bloques durante raideos."
|
||||
flag-description-custom-ride="Controla si los vehiculos(incluyendo animales) pueden ser montados."
|
||||
flag-description-custom-silverfish-block-infest="Controla si los silverfish pueden infestar bloques como el cobblestone."
|
||||
flag-description-custom-sleep="Controla si un jugador puede dormir en camas."
|
||||
flag-description-custom-snow-fall="Controla si puede nevar."
|
||||
flag-description-custom-snow-melt="Controla si la nieve puede derretirse."
|
||||
|
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="Contrôle si une entité peut entrer en collision avec une entité.\n&dExemple&f : Pour prévenir une entité d'entrer en collision avec un cadre, entre\n&a/cf collide-entity minecraft:item_frame false\n&bNote&f : minecraft représente le modID et item_frame représente le blockID.\nNe pas spécifier de modID prendra toujours minecraft par défaut."
|
||||
flag-description-command-execute="Contrôle si une commande peut être exécutée.\n&dExemple&f : Pour prévenir la commandes pixelmon '/shop select' d'être exécutée, entre\n&a/cf command-execute pixelmon:shop[select] false\n&bNote&f : &o&6pixelmon&f représente le modID et &o&6shop&f représente la commande de base, et &o&6select&f représente l'argument.\nNe pas spécifier de modID prendra toujours minecraft par défaut."
|
||||
flag-description-command-execute-pvp="Contrôle si une commande peut être exécutée en état PvP.\n&dExemple&f : Pour prévenir la commandes pixelmon '/shop select' d'être exécutée, entre\n&a/cf command-execute pixelmon:shop[select] false\n&bNote&f : &o&6pixelmon&f représente le modID et &o&6shop&f représente la commande de base, et &o&6select&f représente l'argument.\nNe pas spécifier de modID prendra toujours minecraft par défaut."
|
||||
flag-description-custom-animal-block-modify="Controls whether animals can modify blocks."
|
||||
flag-description-custom-armorstand-use="Controls whether armorstands can be placed or broken."
|
||||
flag-description-custom-block-trampling="Contrôle si les terres agricoles et les œufs de tortue peuvent être piétinés."
|
||||
flag-description-custom-build="Contrôle les actions autorisées contre les blocs comme le minage, placement et intéraction."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="Contrôle si les joueur peuvent se téléporter vers la protection."
|
||||
flag-description-custom-player-villager-damage="Contrôle si le joueur peut infliger des dégâts au villageois."
|
||||
flag-description-custom-pvp="Contrôle si le combat Joueur contre Joueur est autorisé."
|
||||
flag-description-custom-ravager-block-break="Controls whether ravagers can break blocks during raids."
|
||||
flag-description-custom-ride="Contrôle si les véhicules (incluant les animaux) peuvent être montés."
|
||||
flag-description-custom-silverfish-block-infest="Controls whether silverfish can infest blocks such as cobblestone."
|
||||
flag-description-custom-sleep="Contrôle si les joueurs peuvent dormir dans les lits."
|
||||
flag-description-custom-snow-fall="Contrôle si la neige peut tomber."
|
||||
flag-description-custom-snow-melt="Contrôle si la neige peut fondre."
|
||||
|
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="Ustala, czy obiekt może wchodzić w interakcje z innym obiektem.\n&dPrzykład&f : Aby obiekt nie wchodził w interakcje z obrazem, wpisz\n&a/cf collide-entity minecraft:item_frame false\n&bUwaga&f : minecraft oznacza ID moda a item_frame to id obiektu z którym ma nie być reakcji.\nBez wpisania nazwy moda użyte zostanie 'minecraft:'."
|
||||
flag-description-command-execute="Ustala, czy można używać danej komendy.\n&dUwaga&f : Aby wyłączyć pixelmonową komendę '/shop select', wpisz\n&a/cf command-execute pixelmon:shop[select] false\n&bUwaga&f : &o&6pixelmon&f to ID moda, &o&6shop&f to komenda, a &o&6select&f to argument komendy.\nBez wpisania nazwy moda użyte zostanie 'minecraft:'."
|
||||
flag-description-command-execute-pvp="Ustala, czy komendy można użyć w trakcie PvP.\n&dPrzykład&f : Aby wyłączyć pixelmonową komendę '/shop select' w trakcie PvP, wpisz\n&a/cf command-execute pixelmon:shop[select] false\n&bUwaga&f : &o&6pixelmon&f to ID moda, &o&6shop&f to podstawowa komenda, a &o&6select&f to jej argument.\nBez wpisania nazwy moda użyte zostanie 'minecraft:'."
|
||||
flag-description-custom-animal-block-modify="Controls whether animals can modify blocks."
|
||||
flag-description-custom-armorstand-use="Ustala, czy stojaki na zbroje mogą być stawiane i niszczone."
|
||||
flag-description-custom-block-trampling="Ustala, czy farmy i żółwie jajka mogą być rozdeptywane."
|
||||
flag-description-custom-build="Ustala czy możliwe są akcje takie jak wydobycie, stawianie, uruchamianie oraz interakcja."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="Ustala, czy gracze mogą teleportować się na tę działkę."
|
||||
flag-description-custom-player-villager-damage="Ustala, czy gracze mogą atakować wieśniaków."
|
||||
flag-description-custom-pvp="Ustala, czy PvP jest włączone."
|
||||
flag-description-custom-ravager-block-break="Controls whether ravagers can break blocks during raids."
|
||||
flag-description-custom-ride="Ustala, czy można jeździć pojazdami i na zwierzętach."
|
||||
flag-description-custom-silverfish-block-infest="Controls whether silverfish can infest blocks such as cobblestone."
|
||||
flag-description-custom-sleep="Ustala, czy można spać w łóżku."
|
||||
flag-description-custom-snow-fall="Ustala opady śniegu."
|
||||
flag-description-custom-snow-melt="Ustala topnienie śniegu."
|
||||
|
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="Управляет возможностью столкновения сущности с другой сущностью.\n&dПример&f : чтобы отключить столкновение сущностей с рамками, введите\n&a/cf collide-entity minecraft:item_frame false\n&bПримечание&f : minecraft - это id мода, а item_frame - id сущности.\nЕсли id мода не указан - будет использоваться minecraft."
|
||||
flag-description-command-execute="Управляет возможностью выполнять команды.\n&dПример&f : чтобы запретить команду '/shop select' из Pixelmon, введите\n&a/cf command-execute pixelmon:shop[select] false\n&bПримечание&f : &o&6pixelmon&f - это id мода, &o&6shop&f - базовая команда, а &o&6select&f - аргумент.\nЕсли id мода не указан - будет использоваться minecraft."
|
||||
flag-description-command-execute-pvp="Управляет возможностью выполнять команды во время сражения с другим игроком.\n&dПример&f : чтобы запретить команду '/shop select' из Pixelmon, введите \n&a/cf command-execute-pvp pixelmon:shop[select] false\n&bПримечание&f : &o&6pixelmon&f - это id модв, &o&6shop&f - базовая команда, а &o&6select&f - аргумент.\nЕсли id мода не указан - будет использоваться minecraft."
|
||||
flag-description-custom-animal-block-modify="Управляет возможностью животных изменять блоки."
|
||||
flag-description-custom-armorstand-use="Управляет возможностью ставить и ломать стойки для брони."
|
||||
flag-description-custom-block-trampling="Управляет, можно ли растоптать грядки и черепаховые яйца."
|
||||
flag-description-custom-build="Управляет возможностью совершения действий с блоками и сущностями, таких, как поломка, установка и взаимодействие."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="Управляет возможностью игроков телепортироваться в регион."
|
||||
flag-description-custom-player-villager-damage="Управляет возможностью игроков наносить урон жителям."
|
||||
flag-description-custom-pvp="Управляет возможностью сражений между игроками."
|
||||
flag-description-custom-ravager-block-break="Управляет возможностью Разорителей ломать блоки во время рейдов."
|
||||
flag-description-custom-ride="Управляет возможностью садиться на транспорт (включая животных)."
|
||||
flag-description-custom-silverfish-block-infest="Управляет возможностью чешуйниц заражать блоки, такие, как булыжник."
|
||||
flag-description-custom-sleep="Управляет возможностью игрока спать в кроватях."
|
||||
flag-description-custom-snow-fall="Управляет возможностью появления снега."
|
||||
flag-description-custom-snow-melt="Управляет возможностью таяния снега."
|
||||
|
@ -74,7 +74,7 @@ GriefDefender {
|
||||
trust-container="給予玩家權限去與所有方塊互動,包括容器."
|
||||
trust-group="給予一個權限組的人士使用您的這個領地.\n存取權限身份: 允許活動所有方塊,除了容器.\n容器使用權限身份: 允許活動所有方塊,包括容器.\n建築者: 允許所有以上的權限,包括放置及破壞方塊的權限.\n管理者: 允許所有以上的權限,包括更改領地內設定."
|
||||
trust-group-all="給予一個權限組的人士使用您所有的領地.\n存取權限身份: 允許活動所有方塊,除了容器.\n容器使用權限身份: 允許活動所有方塊,包括容器.\n建築者: 允許所有以上的權限,包括放置及破壞方塊的權限.\n管理者: 允許所有以上的權限,包括更改領地內設定."
|
||||
trust-list="Manages trust for the claim you're standing in."
|
||||
trust-list="管理你正身處領地的信任權限."
|
||||
trust-player="給予一個玩家使用您的這個領地.\n存取權限身份: 允許活動所有方塊,除了容器.\n容器使用權限身份: 允許活動所有方塊,包括容器.\n建築者: 允許所有以上的權限,包括放置及破壞方塊的權限.\n管理者: 允許所有以上的權限,包括更改領地內設定."
|
||||
trust-player-all="給予一個玩家使用您所有的領地.\n存取權限身份: 允許活動所有方塊,除了容器.\n容器使用權限身份: 允許活動所有方塊,包括容器.\n建築者: 允許所有以上的權限,包括放置及破壞方塊的權限.\n管理者: 允許所有以上的權限,包括更改領地內設定."
|
||||
untrust-group="移除一個群組使用您這個領地的權限."
|
||||
@ -96,7 +96,7 @@ GriefDefender {
|
||||
abandon-success="&a領地已經被放棄. 你現在有&6{amount}&a 可用的領地."
|
||||
abandon-top-level="&c這個領地不能被放棄因為他已經有一個或以上的細分(子)領地. 放棄領地細分(子)領地請使用 &f/abandontop&c ."
|
||||
abandon-town-children="&c您沒有權限去放棄一個你的市鎮領地,因為旗下的細分(子)領地不是屬於你的。管理員的話請使用 &f/ignoreclaim&c,或者請叫細分(子)領地負責人先將其領地移除。如果你只是想移除整個市鎮領地而不打算影響到你這個市鎮旗下的細分(子)領地,請使用&f/abandon.."
|
||||
abandon-warning="&6Are 你確定你想要放棄這個領地嗎? 這不會再保護領地不受惡意破壞."
|
||||
abandon-warning="&6你確定你想要放棄這個領地嗎? 這不會再保護領地不受惡意破壞."
|
||||
abandon-world-success="&a破壞所有玩家在&6{world}&a的領地 ."
|
||||
abandon-world-warning="&6你確定你要放棄 &c所有&6 玩家在&a{world}&6的領地 ?"
|
||||
adjust-accrued-blocks-success="&a調整 &6{player}&a的累計領地數量到 &6{amount}&a. 新的總共累計領地格數是: &6{total}&a."
|
||||
@ -264,7 +264,7 @@ GriefDefender {
|
||||
create-failed-result="&a你這個領地無法創立,因為 : &6{reason}&a."
|
||||
create-insufficient-blocks-2d="&c你沒有足夠的年底格數可以設立這個領地.\n您需要多 &a{block-amount}&c 個領地格數."
|
||||
create-insufficient-blocks-3d="&c你沒有足夠的年底格數可以設立這個領地.\n您需要多 &a{chunk-amount}&c 區塊. &f({block-amount})"
|
||||
create-overlap="&cc你不能在這裡創建領地因為會覆蓋已存在的領地."
|
||||
create-overlap="&c你不能在這裡創建領地因為會覆蓋已存在的領地."
|
||||
create-overlap-player="&c你不能在這裡創建領地因為會覆蓋 &6{player}&c的領地."
|
||||
create-overlap-short="&c你選擇的位置已經存在領地."
|
||||
create-subdivision-fail="&c你所選定的角落沒有領地保護. 請選擇一個有效的地方位於主領地內,才可以建立細分(子)領地."
|
||||
@ -382,6 +382,7 @@ GriefDefender {
|
||||
flag-description-collide-entity="控制關於一個實體能否碰撞實體.\n&d例子&f : 如有防止實體碰撞並使用物品展示框, 使用指令\n&a/cf collide-entity minecraft:item_frame false\n&b注意&f : minecraft 這個字用作指定系統來自的模組(原版寫minecraft),item_frame 代表這個模組或者原版的方塊id.\n如果你沒有指定來自原版或者模組則一律當作來自原版minecraft."
|
||||
flag-description-command-execute="控制關於一個指令能否執行.\n&d例子&f : 如要防止pixelmon(港:寵物小精靈 | 台:寶可夢/神奇寶貝)模組的指令 '/shop select' 執行, 使用指令\n&a/cf command-execute pixelmon:shop[select] false\n&b注意&f : &o&6pixelmon&f 代表這個模組,&o&6shop&f 代表這個模組的基本指令, &o&6select&f 代表參數.\n如果你沒有指定來自原版或者模組則一律當作來自原版minecraft."
|
||||
flag-description-command-execute-pvp="控制關於一個指令能否在pvp途中執行.\n&d例子&f : 如要防止pixelmon(港:寵物小精靈 | 台:寶可夢/神奇寶貝)模組的指令 '/shop select' 執行, 使用指令\n&a/cf command-execute pixelmon:shop[select] false\n&b注意&f : &o&6pixelmon&f 代表這個模組,&o&6shop&f 代表這個模組的基本指令, &o&6select&f 代表參數.\n如果你沒有指定來自原版或者模組則一律當作來自原版minecraft."
|
||||
flag-description-custom-animal-block-modify="控制關於動物能否更改方塊."
|
||||
flag-description-custom-armorstand-use="控制關於盔甲架可以放置或者破壞."
|
||||
flag-description-custom-block-trampling="控制關於農田以及龜蛋可以被踐踏."
|
||||
flag-description-custom-build="控制關於對方塊或者實體的行為是否允許,例如挖礦,放置方塊,使用方塊."
|
||||
@ -437,7 +438,9 @@ GriefDefender {
|
||||
flag-description-custom-player-teleport-to="控制關於玩家可否傳送到這個領地."
|
||||
flag-description-custom-player-villager-damage="控制關於玩家可否對村民造成傷害."
|
||||
flag-description-custom-pvp="控制關於pvp是否允許."
|
||||
flag-description-custom-ravager-block-break="控制關於劫毀獸(ravagers)可否在突襲途中破壞方塊."
|
||||
flag-description-custom-ride="控制關於載具(包括動物) 可否騎乘."
|
||||
flag-description-custom-silverfish-block-infest="控制關於蠹魚可否蛀蝕方塊,例如鵝卵石."
|
||||
flag-description-custom-sleep="控制關於玩家可否在使用床睡覺."
|
||||
flag-description-custom-snow-fall="控制關於雪可否掉落."
|
||||
flag-description-custom-snow-melt="控制關於雪可否融化."
|
||||
@ -512,7 +515,7 @@ GriefDefender {
|
||||
flag-ui-override-no-permission="這個設定已經被管理員複寫並且 &n&c不可以&f 更改."
|
||||
flag-ui-override-permission="{flag}&f 暫時被管理員 &c複寫&f .\n點擊這裡移除這個設定."
|
||||
flag-ui-return-flags=回到領地設定頁面
|
||||
label-accessors=存取者
|
||||
label-accessors=訪問者
|
||||
label-all=所有
|
||||
label-area=區域大小
|
||||
label-available=可用
|
||||
@ -794,7 +797,7 @@ GriefDefender {
|
||||
teleport-move-cancel="&c傳送被取消! 你不可以在傳送途中移動."
|
||||
teleport-no-safe-location="&c無法找到領地內安全的落腳點!\n&a請使用 '&f/claiminfo&a' 去設置一個安全的重生點."
|
||||
teleport-success="&a你已經被傳送到 {name}&a."
|
||||
title-accessor=存取者
|
||||
title-accessor=訪問者
|
||||
title-admin=管理員
|
||||
title-advanced=高級
|
||||
title-all=所有
|
||||
@ -825,7 +828,7 @@ GriefDefender {
|
||||
trust-click-show-list="點擊這裏顯示有關於所有玩家和群組在領地內的權限列表."
|
||||
trust-grant="&a給予了 &6{target}&a {type}&a 權限在這個領地."
|
||||
trust-individual-all-claims="&a已經給予 &6{player}&a 完全信任權限身份在你所有的領地. 如果你要將所有領地的權限移除, 請使用 &f/untrustall&a."
|
||||
trust-invalid="&c您輸入了一個無效的領地信任權限身份.\n允許的種類有 : 存取者, 建築者, 容器使用, 以及 管理者."
|
||||
trust-invalid="&c您輸入了一個無效的領地信任權限身份.\n允許的種類有 : 訪問者, 建築者, 容器使用, 以及 管理者."
|
||||
trust-list-header="明確的權限在此:"
|
||||
trust-no-claims="&c你並沒有領地可以給予信任權限身份."
|
||||
trust-plugin-cancel="&c您給予信用權限給 {target}&c. 一個插件防止了這個行為."
|
||||
@ -836,14 +839,14 @@ GriefDefender {
|
||||
ui-click-confirm=點擊這裡確認
|
||||
ui-click-filter-type="點擊這裡過濾到只顯示 {type}&f"
|
||||
ui-click-record-chat="點擊這裡觀看聊天記錄."
|
||||
ui-click-remove=點擊這裡羽翼
|
||||
ui-click-remove=點擊這裡移除
|
||||
ui-click-return-command="&b返回頁面 &6{command}"
|
||||
ui-click-view="點擊這裡觀看 {target}"
|
||||
ui-click-view-transactions="點擊這裡觀看所有交易."
|
||||
ui-conflict-data="衝突數據"
|
||||
ui-record-chat="記錄-聊天"
|
||||
untrust-individual-all-claims="&a已經移除 &6{target}&a 的存取者權限身份在你所有的領地內. 如果你只需要設定一個領地的權限, 請站在該領地內並且使用指令 &f/untrust&a."
|
||||
untrust-individual-single-claim="&a已經移除 &6{target}&a 的存取者權限身份在這個領地內. 如果你需要同時設定所有領地的設定, 請使用指令 &f/untrustall&a."
|
||||
untrust-individual-all-claims="&a已經移除 &6{target}&a 的訪問者權限身份在你所有的領地內. 如果你只需要設定一個領地的權限, 請站在該領地內並且使用指令 &f/untrust&a."
|
||||
untrust-individual-single-claim="&a已經移除 &6{target}&a 的訪問者權限身份在這個領地內. 如果你需要同時設定所有領地的設定, 請使用指令 &f/untrustall&a."
|
||||
untrust-no-claims="&c你沒有領地可以取消信任權限身份組."
|
||||
untrust-owner="&6{owner}&a 是這個領地的擁有人,你不可以移除他的信任權限身份."
|
||||
untrust-self="&c你不可以移除您自己的信任權限身份."
|
||||
|
@ -2,13 +2,13 @@
|
||||
name=GriefDefender
|
||||
group=com.griefdefender
|
||||
url=https://github.com/bloodmc/GriefDefender
|
||||
version=1.5.6
|
||||
version=1.5.9
|
||||
apiVersion=1.0.0-20201225.034857-27
|
||||
# Bukkit
|
||||
adapterVersion=1.16.4-20201225.205541-14
|
||||
adapterVersion=1.16.4-20210101.000151-15
|
||||
spigotVersion=1.16.4-R0.1-SNAPSHOT
|
||||
# Sponge
|
||||
adapterSpongeVersion=1.12.2-20201225.041422-15
|
||||
adapterSpongeVersion=1.12.2-20210101.010513-16
|
||||
commonVersion=1.12.2-7.1.7-SNAPSHOT
|
||||
minecraftVersion=1.12.2
|
||||
mcpMappings=snapshot_20180808
|
||||
|
@ -325,8 +325,8 @@ public class GriefDefenderPlugin {
|
||||
public boolean permPluginInstalled = false;
|
||||
|
||||
public GDBlockType createVisualBlock;
|
||||
public GDItemType modificationTool;
|
||||
public GDItemType investigationTool;
|
||||
public String modificationTool;
|
||||
public String investigationTool;
|
||||
|
||||
public static boolean debugLogging = false;
|
||||
public static boolean debugActive = false;
|
||||
@ -664,18 +664,6 @@ public void onServerAboutToStart(GameAboutToStartServerEvent event) {
|
||||
new PlaceholderProvider();
|
||||
this.getLogger().info("GriefDefender PlaceholderAPI expansion enabled!");
|
||||
}
|
||||
try {
|
||||
if (Sponge.getPluginManager().getPlugin("nucleus").isPresent()) {
|
||||
try {
|
||||
Class.forName("io.github.nucleuspowered.nucleus.api.events.NucleusHomeEvent");
|
||||
this.nucleusApiProvider = new NucleusProviderLegacy();
|
||||
} catch (ClassNotFoundException e) {
|
||||
this.nucleusApiProvider = new NucleusProviderV2();
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
// ignore
|
||||
}
|
||||
if (Sponge.getPluginManager().getPlugin("worldedit").isPresent() || Sponge.getPluginManager().getPlugin("fastasyncworldedit").isPresent()) {
|
||||
this.worldEditProvider = new GDWorldEditProvider();
|
||||
}
|
||||
@ -698,6 +686,19 @@ public void onServerAboutToStart(GameAboutToStartServerEvent event) {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (Sponge.getPluginManager().getPlugin("nucleus").isPresent()) {
|
||||
try {
|
||||
Class.forName("io.github.nucleuspowered.nucleus.api.events.NucleusHomeEvent");
|
||||
this.nucleusApiProvider = new NucleusProviderLegacy();
|
||||
} catch (ClassNotFoundException e) {
|
||||
this.nucleusApiProvider = new NucleusProviderV2();
|
||||
}
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
Sponge.getEventManager().registerListeners(GDBootstrap.getInstance(), new BlockEventHandler(dataStore));
|
||||
Sponge.getEventManager().registerListeners(GDBootstrap.getInstance(), new PlayerEventHandler(dataStore, this));
|
||||
Sponge.getEventManager().registerListeners(GDBootstrap.getInstance(), new EntityEventHandler(dataStore));
|
||||
@ -775,14 +776,14 @@ public void onServerStarted(GameStartedServerEvent event) {
|
||||
|
||||
Sponge.getScheduler().createTaskBuilder().delayTicks(1).intervalTicks(1).execute(new PlayerTickTask())
|
||||
.submit(GDBootstrap.getInstance());
|
||||
if (!isEconomyModeEnabled() || GriefDefenderPlugin.getGlobalConfig().getConfig().economy.useClaimBlockTask) {
|
||||
if ((!isEconomyModeEnabled() && GriefDefenderPlugin.getGlobalConfig().getConfig().claim.claimBlockTask) || GriefDefenderPlugin.getGlobalConfig().getConfig().economy.useClaimBlockTask) {
|
||||
Sponge.getScheduler().createTaskBuilder().interval(5, TimeUnit.MINUTES).execute(new ClaimBlockTask())
|
||||
.submit(GDBootstrap.getInstance());
|
||||
}
|
||||
|
||||
if (GriefDefenderPlugin.getInstance().getEconomyService() != null) {
|
||||
if (GriefDefenderPlugin.getGlobalConfig().getConfig().economy.isRentSignEnabled()) {
|
||||
Sponge.getScheduler().createTaskBuilder().intervalTicks(GriefDefenderPlugin.getGlobalConfig().getConfig().economy.signUpdateInterval).execute(new SignUpdateTask())
|
||||
Sponge.getScheduler().createTaskBuilder().interval(GriefDefenderPlugin.getGlobalConfig().getConfig().economy.signUpdateInterval, TimeUnit.MINUTES).execute(new SignUpdateTask())
|
||||
.submit(GDBootstrap.getInstance());
|
||||
}
|
||||
if (GriefDefenderPlugin.getGlobalConfig().getConfig().economy.rentSystem) {
|
||||
@ -1230,8 +1231,8 @@ public void loadConfig() {
|
||||
final GDItemType defaultModTool = ItemTypeRegistryModule.getInstance().getById("minecraft:golden_shovel").orElse(null);
|
||||
final GDBlockType defaultCreateVisualBlock = BlockTypeRegistryModule.getInstance().getById("minecraft:diamond_block").orElse(null);
|
||||
this.createVisualBlock = BlockTypeRegistryModule.getInstance().getById(BaseStorage.globalConfig.getConfig().visual.claimCreateStartBlock).orElse(defaultCreateVisualBlock);
|
||||
this.modificationTool = ItemTypeRegistryModule.getInstance().getById(BaseStorage.globalConfig.getConfig().claim.modificationTool).orElse(defaultModTool);
|
||||
this.investigationTool = ItemTypeRegistryModule.getInstance().getById(BaseStorage.globalConfig.getConfig().claim.investigationTool).orElse(ItemTypeRegistryModule.getInstance().getById("minecraft:stick").get());
|
||||
this.modificationTool = BaseStorage.globalConfig.getConfig().claim.modificationTool;
|
||||
this.investigationTool = BaseStorage.globalConfig.getConfig().claim.investigationTool;
|
||||
if (this.dataStore != null) {
|
||||
for (World world : Sponge.getGame().getServer().getWorlds()) {
|
||||
DimensionType dimType = world.getProperties().getDimensionType();
|
||||
|
@ -184,6 +184,7 @@ public static MessageCache getInstance() {
|
||||
public Component ECONOMY_SIGN_SOLD_LINE4;
|
||||
public Component ECONOMY_VIRTUAL_NOT_SUPPORTED;
|
||||
public Component FEATURE_NOT_AVAILABLE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_ANIMAL_BLOCK_MODIFY;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_ARMOR_STAND_USE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_BLOCK_TRAMPLING;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_CHEST_ACCESS;
|
||||
@ -236,8 +237,10 @@ public static MessageCache getInstance() {
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_PISTON_ITEM_SPAWN;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_PISTON_USE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_PVP;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_RAVAGER_BLOCK_BREAK;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_RIDE;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SLEEP;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SILVERFISH_BLOCK_INFEST;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SNOW_FALL;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SNOW_MELT;
|
||||
public Component FLAG_DESCRIPTION_CUSTOM_SNOWMAN_TRAIL;
|
||||
@ -667,6 +670,7 @@ public void loadCache() {
|
||||
ECONOMY_SIGN_SOLD_LINE4 = MessageStorage.MESSAGE_DATA.getMessage("economy-sign-sold-line4");
|
||||
ECONOMY_VIRTUAL_NOT_SUPPORTED = MessageStorage.MESSAGE_DATA.getMessage("economy-virtual-not-supported");
|
||||
FEATURE_NOT_AVAILABLE = MessageStorage.MESSAGE_DATA.getMessage("feature-not-available");
|
||||
FLAG_DESCRIPTION_CUSTOM_ANIMAL_BLOCK_MODIFY = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-animal-block-modify");
|
||||
FLAG_DESCRIPTION_CUSTOM_ARMOR_STAND_USE = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-armorstand-use");
|
||||
FLAG_DESCRIPTION_CUSTOM_BLOCK_TRAMPLING = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-block-trampling");
|
||||
FLAG_DESCRIPTION_CUSTOM_CHEST_ACCESS = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-chest-access");
|
||||
@ -719,7 +723,9 @@ public void loadCache() {
|
||||
FLAG_DESCRIPTION_CUSTOM_PLAYER_TELEPORT_TO = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-player-teleport-to");
|
||||
FLAG_DESCRIPTION_CUSTOM_PLAYER_VILLAGER_DAMAGE = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-player-villager-damage");
|
||||
FLAG_DESCRIPTION_CUSTOM_PVP = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-pvp");
|
||||
FLAG_DESCRIPTION_CUSTOM_RAVAGER_BLOCK_BREAK = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-ravager-block-break");
|
||||
FLAG_DESCRIPTION_CUSTOM_RIDE = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-ride");
|
||||
FLAG_DESCRIPTION_CUSTOM_SILVERFISH_BLOCK_INFEST = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-silverfish-block-infest");
|
||||
FLAG_DESCRIPTION_CUSTOM_SLEEP = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-sleep");
|
||||
FLAG_DESCRIPTION_CUSTOM_SNOW_FALL = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-snow-fall");
|
||||
FLAG_DESCRIPTION_CUSTOM_SNOW_MELT = MessageStorage.MESSAGE_DATA.getMessage("flag-description-custom-snow-melt");
|
||||
|
@ -308,19 +308,17 @@ public void execute(CommandSource src, String[] args) {
|
||||
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(Consumer -> { CommandHelper.displayClaimBankInfo(src, gdClaim, gdClaim.isTown() ? true : false, true); })))
|
||||
.build();
|
||||
}
|
||||
forSaleText = TextComponent.builder()
|
||||
TextComponent.Builder forSaleBuilder = TextComponent.builder()
|
||||
.append(MessageCache.getInstance().CLAIMINFO_UI_FOR_SALE.color(TextColor.YELLOW))
|
||||
.append(" : ")
|
||||
.append(getClickableInfoText(src, claim, FOR_SALE, claim.getEconomyData().isForSale() ? MessageCache.getInstance().LABEL_YES.color(TextColor.GREEN) : MessageCache.getInstance().LABEL_NO.color(TextColor.GRAY))).build();
|
||||
.append(claim.getEconomyData().isForSale() ? MessageCache.getInstance().LABEL_YES.color(TextColor.GREEN) : MessageCache.getInstance().LABEL_NO.color(TextColor.GRAY));
|
||||
if (claim.getEconomyData().isForSale()) {
|
||||
forSaleText = TextComponent.builder()
|
||||
.append(forSaleText)
|
||||
.append(" ")
|
||||
.append(MessageCache.getInstance().LABEL_PRICE.color(TextColor.YELLOW))
|
||||
.append(" : ")
|
||||
.append(String.valueOf(claim.getEconomyData().getSalePrice()), TextColor.GOLD)
|
||||
.build();
|
||||
forSaleBuilder.append(" ")
|
||||
.append(MessageCache.getInstance().LABEL_PRICE.color(TextColor.YELLOW))
|
||||
.append(" : ")
|
||||
.append(String.valueOf(claim.getEconomyData().getSalePrice()), TextColor.GOLD);
|
||||
}
|
||||
forSaleText = forSaleBuilder.build();
|
||||
}
|
||||
|
||||
Component claimId = TextComponent.builder()
|
||||
|
@ -46,6 +46,10 @@ public class ClaimCategory extends ConfigCategory {
|
||||
@Setting(value = "claim-block-task-move-threshold", comment = "The minimum threshold of movement (in blocks) required to receive accrued claim blocks. (Default: 0)"
|
||||
+ "\nNote: The claim block task runs every 5 minutes which is the time each player will get to move the required amount of blocks.")
|
||||
public int claimBlockTaskMoveThreshold = 0;
|
||||
@Setting(value = "claim-block-task", comment = "Whether claim block task should run to accrue blocks for players. (Default: True)"
|
||||
+ "\nNote: If in economy-mode, use setting 'use-claim-block-task' under economy category."
|
||||
+ "\nNote: To configure amount accrued, see 'blocks-accrued-per-hour' option at https://github.com/bloodmc/GriefDefender/wiki/Options-(Meta)#global-options")
|
||||
public boolean claimBlockTask = true;
|
||||
@Setting(value = "worldedit-schematics", comment = "Whether to use WorldEdit for schematics. Default: false"
|
||||
+ "\nNote: If you were using schematics in older GD/GP versions and want old schematics to work then you should keep this setting disabled.")
|
||||
public boolean useWorldEditSchematics = false;
|
||||
|
@ -38,6 +38,10 @@ public class VisualCategory extends ConfigCategory {
|
||||
public boolean hideFillers = false;
|
||||
@Setting(value = "hide-wecui-drag-visuals-2d", comment = "Whether drag visuals should be shown while creating a claim in 2D mode.")
|
||||
public boolean hideDrag2d = true;
|
||||
@Setting(value = "cuboid-level-visuals-2d", comment = "Whether to use cuboid visuals, in 2D claims, during inspection with owner min/max claim levels between 0 and 255."
|
||||
+ "\nNote: WECUI visuals are not associated to this option."
|
||||
+ "\nNote: If enabled, this will send many block updates to players causing more client strain depending on size of claim. Use with caution.")
|
||||
public boolean cuboidLevelVisuals = false;
|
||||
@Setting(value = "client-visuals-per-tick", comment = "The amount of block visuals a client can receive per tick when showing/hiding claims. Default: 12")
|
||||
public int clientVisualsPerTick = 12;
|
||||
@Setting(value = "claim-create-block", comment = "The visual block used during claim creation. (Default: minecraft:diamond_block)")
|
||||
|
@ -253,15 +253,21 @@ public void onBlockPre(ChangeBlockEvent.Pre event) {
|
||||
// If a player successfully interacted with a block recently such as a pressure plate, ignore check
|
||||
// This fixes issues such as pistons not being able to extend
|
||||
if (user != null && !isForgePlayerBreak && playerData != null && playerData.eventResultCache != null && playerData.eventResultCache.checkEventResultCache(targetClaim, "block-pre") == Tristate.TRUE) {
|
||||
GDPermissionManager.getInstance().processEventLog(event, location, targetClaim, Flags.BLOCK_BREAK.getPermission(), source, blockState, user, playerData.eventResultCache.lastTrust, Tristate.TRUE);
|
||||
if (!isLiquidSource && !isFireSource && !isLeafDecay) {
|
||||
GDPermissionManager.getInstance().processEventLog(event, location, targetClaim, Flags.BLOCK_BREAK.getPermission(), source, blockState, user, playerData.eventResultCache.lastTrust, Tristate.TRUE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (user != null && targetClaim.isUserTrusted(user, TrustTypes.BUILDER)) {
|
||||
GDPermissionManager.getInstance().processEventLog(event, location, targetClaim, Flags.BLOCK_BREAK.getPermission(), source, blockState, user, TrustTypes.BUILDER.getName().toLowerCase(), Tristate.TRUE);
|
||||
if (!isLiquidSource && !isFireSource && !isLeafDecay) {
|
||||
GDPermissionManager.getInstance().processEventLog(event, location, targetClaim, Flags.BLOCK_BREAK.getPermission(), source, blockState, user, TrustTypes.BUILDER.getName().toLowerCase(), Tristate.TRUE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (sourceClaim.getOwnerUniqueId().equals(targetClaim.getOwnerUniqueId()) && user == null && sourceEntity == null && !isFireSource && !isLeafDecay) {
|
||||
GDPermissionManager.getInstance().processEventLog(event, location, targetClaim, Flags.BLOCK_BREAK.getPermission(), source, blockState, user, "owner", Tristate.TRUE);
|
||||
if (!isLiquidSource) {
|
||||
GDPermissionManager.getInstance().processEventLog(event, location, targetClaim, Flags.BLOCK_BREAK.getPermission(), source, blockState, user, "owner", Tristate.TRUE);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (user != null && pistonExtend) {
|
||||
@ -784,6 +790,29 @@ public void onBlockPlace(ChangeBlockEvent.Place event) {
|
||||
return;
|
||||
}
|
||||
|
||||
// handle ice form/melt
|
||||
if (event.getTransactions().size() == 1) {
|
||||
final BlockSnapshot sourceBlock = event.getTransactions().get(0).getOriginal();
|
||||
final BlockSnapshot targetBlock = event.getTransactions().get(0).getFinal();
|
||||
if (NMSUtil.getInstance().isBlockWater(sourceBlock.getState().getType()) && NMSUtil.getInstance().isBlockIce(targetBlock.getState().getType())) {
|
||||
final Location<World> loc = targetBlock.getLocation().get();
|
||||
final GDClaim claim = this.dataStore.getClaimAt(loc);
|
||||
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, loc, claim, Flags.BLOCK_MODIFY, sourceBlock, targetBlock, (Player) null, true);
|
||||
if (result == Tristate.FALSE) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
} else if (NMSUtil.getInstance().isBlockIce(sourceBlock.getState().getType()) && NMSUtil.getInstance().isBlockWater(targetBlock.getState().getType())) {
|
||||
final Location<World> loc = targetBlock.getLocation().get();
|
||||
final GDClaim claim = this.dataStore.getClaimAt(loc);
|
||||
final Tristate result = GDPermissionManager.getInstance().getFinalPermission(event, loc, claim, Flags.BLOCK_MODIFY, sourceBlock, targetBlock, (Player) null, true);
|
||||
if (result == Tristate.FALSE) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ItemStackSnapshot itemSnapshot = event.getContext().get(EventContextKeys.USED_ITEM).orElse(null);
|
||||
if (itemSnapshot != null) {
|
||||
if (itemSnapshot.getType().equals(ItemTypes.BUCKET)) {
|
||||
@ -806,7 +835,7 @@ public void onBlockPlace(ChangeBlockEvent.Place event) {
|
||||
} else {
|
||||
sourceClaim = this.getSourceClaim(event.getCause());
|
||||
}
|
||||
if (sourceClaim == null) {
|
||||
if (sourceClaim == null && user == null) {
|
||||
GDTimings.BLOCK_PLACE_EVENT.stopTimingIfSync();
|
||||
return;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ public boolean onEntityMove(MoveEntityEvent event, Location<World> fromLocation,
|
||||
if (welcomeMessage != null && !welcomeMessage.equals(TextComponent.empty()) && !fromClaim.isParent(toClaim)) {
|
||||
ChatType chatType = gpEvent.getEnterMessageChatType();
|
||||
if (showGpPrefix) {
|
||||
final Component enterPrefix = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_ENTER, ImmutableMap.of(
|
||||
final Component enterPrefix = toClaim.isWilderness() || toClaim.isAdminClaim() ? GriefDefenderPlugin.GD_TEXT : MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_ENTER, ImmutableMap.of(
|
||||
"owner", toClaim.getOwnerDisplayName()));
|
||||
TextAdapter.sendComponent(player, TextComponent.builder("")
|
||||
.append(enterClanTag != null ? enterClanTag : enterPrefix)
|
||||
@ -270,7 +270,7 @@ public boolean onEntityMove(MoveEntityEvent event, Location<World> fromLocation,
|
||||
if (farewellMessage != null && farewellMessage != TextComponent.empty() && !toClaim.isParent(fromClaim)) {
|
||||
ChatType chatType = gpEvent.getExitMessageChatType();
|
||||
if (showGpPrefix) {
|
||||
final Component exitPrefix = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_EXIT, ImmutableMap.of(
|
||||
final Component exitPrefix = fromClaim.isWilderness() || fromClaim.isAdminClaim() ? GriefDefenderPlugin.GD_TEXT : MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_EXIT, ImmutableMap.of(
|
||||
"owner", fromClaim.getOwnerDisplayName()));
|
||||
TextAdapter.sendComponent(player, TextComponent.builder("")
|
||||
.append(exitClanTag != null ? exitClanTag : exitPrefix)
|
||||
@ -365,7 +365,7 @@ public boolean onEntityMove(MoveEntityEvent event, Location<World> fromLocation,
|
||||
if (welcomeMessage != null && !welcomeMessage.equals(TextComponent.empty()) && !fromClaim.isParent(toClaim)) {
|
||||
ChatType chatType = gpEvent.getEnterMessageChatType();
|
||||
if (showGpPrefix) {
|
||||
final Component enterPrefix = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_ENTER, ImmutableMap.of(
|
||||
final Component enterPrefix = toClaim.isWilderness() || toClaim.isAdminClaim() ? GriefDefenderPlugin.GD_TEXT : MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_ENTER, ImmutableMap.of(
|
||||
"owner", toClaim.getOwnerDisplayName()));
|
||||
TextAdapter.sendComponent(player, TextComponent.builder("")
|
||||
.append(enterClanTag != null ? enterClanTag : enterPrefix)
|
||||
@ -380,7 +380,7 @@ public boolean onEntityMove(MoveEntityEvent event, Location<World> fromLocation,
|
||||
if (farewellMessage != null && !farewellMessage.equals(TextComponent.empty()) && !toClaim.isParent(fromClaim)) {
|
||||
ChatType chatType = gpEvent.getExitMessageChatType();
|
||||
if (showGpPrefix) {
|
||||
final Component exitPrefix = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_EXIT, ImmutableMap.of(
|
||||
final Component exitPrefix = fromClaim.isWilderness() || fromClaim.isAdminClaim() ? GriefDefenderPlugin.GD_TEXT : MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.CLAIM_PREFIX_EXIT, ImmutableMap.of(
|
||||
"owner", fromClaim.getOwnerDisplayName()));
|
||||
TextAdapter.sendComponent(player, TextComponent.builder("")
|
||||
.append(exitClanTag != null ? exitClanTag : exitPrefix)
|
||||
|
@ -939,7 +939,7 @@ public void onPlayerChangeHeldItem(ChangeInventoryEvent.Held event, @First Playe
|
||||
// if he's switching to the golden shovel
|
||||
for (SlotTransaction transaction : event.getTransactions()) {
|
||||
ItemStackSnapshot newItemStack = transaction.getFinal();
|
||||
if (count == 1 && newItemStack != null && newItemStack.getType().equals(GriefDefenderPlugin.getInstance().modificationTool.getType())) {
|
||||
if (count == 1 && newItemStack != null && newItemStack.getType().getId().equalsIgnoreCase(GriefDefenderPlugin.getInstance().modificationTool)) {
|
||||
if (!playerData.claimTool) {
|
||||
GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().CLAIMTOOL_NOT_ENABLED);
|
||||
GDTimings.PLAYER_CHANGE_HELD_ITEM_EVENT.stopTiming();
|
||||
@ -1095,7 +1095,7 @@ public void onPlayerInteractBlockPrimary(InteractBlockEvent.Primary.MainHand eve
|
||||
|
||||
// Don't send a deny message if the player is holding an investigation tool
|
||||
if (Sponge.getServer().getRunningTimeTicks() != lastInteractItemPrimaryTick || lastInteractItemCancelled != true) {
|
||||
if (!PlayerUtil.getInstance().hasItemInOneHand(player, GriefDefenderPlugin.getInstance().investigationTool.getType())) {
|
||||
if (!playerData.claimMode && (itemInHand == null || !itemInHand.getType().getId().equalsIgnoreCase(GriefDefenderPlugin.getInstance().investigationTool))) {
|
||||
this.sendInteractBlockDenyMessage(itemInHand, clickedBlock, claim, player, playerData, handType);
|
||||
}
|
||||
}
|
||||
@ -1183,7 +1183,7 @@ public void onPlayerInteractBlockSecondary(InteractBlockEvent.Secondary event) {
|
||||
}
|
||||
// Don't send a deny message if the player is holding an investigation tool
|
||||
if (Sponge.getServer().getRunningTimeTicks() != lastInteractItemSecondaryTick || lastInteractItemCancelled != true) {
|
||||
if (!PlayerUtil.getInstance().hasItemInOneHand(player, GriefDefenderPlugin.getInstance().investigationTool.getType())) {
|
||||
if (!playerData.claimMode && (itemInHand == null || !itemInHand.getType().getId().equalsIgnoreCase(GriefDefenderPlugin.getInstance().investigationTool))) {
|
||||
this.sendInteractBlockDenyMessage(itemInHand, clickedBlock, claim, player, playerData, handType);
|
||||
}
|
||||
}
|
||||
@ -1254,13 +1254,13 @@ public InteractEvent handleItemInteract(HandInteractEvent event, Player player,
|
||||
|
||||
final Flag flag = primaryEvent ? Flags.INTERACT_ITEM_PRIMARY : Flags.INTERACT_ITEM_SECONDARY;
|
||||
|
||||
if ((playerData.claimMode && event.getHandType() == HandTypes.MAIN_HAND && primaryEvent) || (!playerData.claimMode && playerData.claimTool && GriefDefenderPlugin.getInstance().investigationTool != null && !itemInHand.isEmpty() && itemInHand.getType().equals(GriefDefenderPlugin.getInstance().investigationTool.getType()))) {
|
||||
if ((playerData.claimMode && event.getHandType() == HandTypes.MAIN_HAND && primaryEvent) || (!playerData.claimMode && playerData.claimTool && GriefDefenderPlugin.getInstance().investigationTool != null && !itemInHand.isEmpty() && itemInHand.getType().getId().equalsIgnoreCase(GriefDefenderPlugin.getInstance().investigationTool))) {
|
||||
investigateClaim(event, player, blockSnapshot, itemInHand);
|
||||
event.setCancelled(true);
|
||||
return event;
|
||||
}
|
||||
|
||||
if ((playerData.claimMode && event.getHandType() == HandTypes.MAIN_HAND && !primaryEvent) || (!playerData.claimMode && playerData.claimTool && GriefDefenderPlugin.getInstance().modificationTool != null && !itemInHand.isEmpty() && itemInHand.getType().equals(GriefDefenderPlugin.getInstance().modificationTool.getType()))) {
|
||||
if ((playerData.claimMode && event.getHandType() == HandTypes.MAIN_HAND && !primaryEvent) || (!playerData.claimMode && playerData.claimTool && GriefDefenderPlugin.getInstance().modificationTool != null && !itemInHand.isEmpty() && itemInHand.getType().getId().equals(GriefDefenderPlugin.getInstance().modificationTool))) {
|
||||
onPlayerHandleClaimCreateAction(event, blockSnapshot, player, itemInHand, playerData);
|
||||
// avoid changing blocks after using a shovel
|
||||
event.setCancelled(true);
|
||||
@ -1884,7 +1884,7 @@ private boolean investigateClaim(InteractEvent event, Player player, BlockSnapsh
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!playerData.claimMode && (itemInHand.isEmpty() || itemInHand.getType() != GriefDefenderPlugin.getInstance().investigationTool.getType())) {
|
||||
if (!playerData.claimMode && (itemInHand.isEmpty() || !itemInHand.getType().getId().equalsIgnoreCase(GriefDefenderPlugin.getInstance().investigationTool))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ public class ContextGroupKeys {
|
||||
public static final String MISC = "#misc";
|
||||
public static final String MONSTER = "#monster";
|
||||
public static final String PET = "#pet";
|
||||
public static final String PLANTS = "#plants";
|
||||
public static final String POTION = "#potion";
|
||||
public static final String VEHICLE = "#vehicle";
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public class ContextGroups {
|
||||
public static final Context SOURCE_MISC = new Context(ContextKeys.SOURCE, ContextGroupKeys.MISC);
|
||||
public static final Context SOURCE_MONSTER = new Context(ContextKeys.SOURCE, ContextGroupKeys.MONSTER);
|
||||
public static final Context SOURCE_PET = new Context(ContextKeys.SOURCE, ContextGroupKeys.PET);
|
||||
public static final Context SOURCE_PLANTS = new Context(ContextKeys.SOURCE, ContextGroupKeys.PLANTS);
|
||||
public static final Context SOURCE_POTION = new Context(ContextKeys.SOURCE, ContextGroupKeys.POTION);
|
||||
public static final Context SOURCE_VEHICLE = new Context(ContextKeys.SOURCE, ContextGroupKeys.VEHICLE);
|
||||
public static final Context TARGET_ANY = new Context(ContextKeys.TARGET, ContextGroupKeys.ANY);
|
||||
@ -50,6 +51,7 @@ public class ContextGroups {
|
||||
public static final Context TARGET_MISC = new Context(ContextKeys.TARGET, ContextGroupKeys.MISC);
|
||||
public static final Context TARGET_MONSTER = new Context(ContextKeys.TARGET, ContextGroupKeys.MONSTER);
|
||||
public static final Context TARGET_PET = new Context(ContextKeys.TARGET, ContextGroupKeys.PET);
|
||||
public static final Context TARGET_PLANTS = new Context(ContextKeys.TARGET, ContextGroupKeys.PLANTS);
|
||||
public static final Context TARGET_POTION = new Context(ContextKeys.TARGET, ContextGroupKeys.POTION);
|
||||
public static final Context TARGET_VEHICLE = new Context(ContextKeys.TARGET, ContextGroupKeys.VEHICLE);
|
||||
|
||||
|
@ -1088,6 +1088,12 @@ private Set<Context> addBlockContexts(Set<Context> contexts, BlockType block, bo
|
||||
} else {
|
||||
contexts.add(ContextGroups.TARGET_CROPS);
|
||||
}
|
||||
} else if (NMSUtil.getInstance().isBlockPlant(block)){
|
||||
if (isSource) {
|
||||
contexts.add(ContextGroups.SOURCE_PLANTS);
|
||||
} else {
|
||||
contexts.add(ContextGroups.TARGET_PLANTS);
|
||||
}
|
||||
}
|
||||
return contexts;
|
||||
}
|
||||
@ -1348,8 +1354,10 @@ public <T> T getInternalOptionValue(TypeToken<T> type, GDPermissionHolder holder
|
||||
if (holder != GriefDefenderPlugin.DEFAULT_HOLDER && holder instanceof GDPermissionUser) {
|
||||
final GDPermissionUser user = (GDPermissionUser) holder;
|
||||
final GDPlayerData playerData = (GDPlayerData) user.getPlayerData();
|
||||
//contexts.addAll(PermissionUtil.getInstance().getActiveContexts(holder));
|
||||
PermissionUtil.getInstance().addActiveContexts(contexts, holder, playerData, claim);
|
||||
// Prevent world contexts being added when checking for accrued blocks in global mode
|
||||
if (option != Options.ACCRUED_BLOCKS || GriefDefenderPlugin.getGlobalConfig().getConfig().playerdata.useWorldPlayerData()) {
|
||||
PermissionUtil.getInstance().addActiveContexts(contexts, holder, playerData, claim);
|
||||
}
|
||||
}
|
||||
|
||||
Set<Context> optionContexts = new HashSet<>(contexts);
|
||||
|
@ -51,12 +51,15 @@ public class FlagContexts {
|
||||
public static final Context SOURCE_PISTON = new Context(ContextKeys.SOURCE, "minecraft:piston");
|
||||
public static final Context SOURCE_PISTON_STICKY = new Context(ContextKeys.SOURCE, "minecraft:sticky_piston");
|
||||
public static final Context SOURCE_PLAYER = new Context(ContextKeys.SOURCE, "minecraft:player");
|
||||
public static final Context SOURCE_RAVAGER = new Context(ContextKeys.SOURCE, "minecraft:ravager");
|
||||
public static final Context SOURCE_SILVERFISH = new Context(ContextKeys.SOURCE, "minecraft:silverfish");
|
||||
public static final Context SOURCE_SNOW = new Context(ContextKeys.SOURCE, "minecraft:snow");
|
||||
public static final Context SOURCE_SNOW_1_12 = new Context(ContextKeys.SOURCE, "minecraft:snow_layer");
|
||||
public static final Context SOURCE_SNOWMAN = new Context(ContextKeys.SOURCE, "minecraft:snow_golem");
|
||||
public static final Context SOURCE_SNOWMAN_1_12 = new Context(ContextKeys.SOURCE, "minecraft:snowman");
|
||||
public static final Context SOURCE_TNT = new Context(ContextKeys.SOURCE, "minecraft:tnt");
|
||||
public static final Context SOURCE_TURTLE_EGG = new Context(ContextKeys.SOURCE, "minecraft:turtle_egg");
|
||||
public static final Context SOURCE_TYPE_ANIMAL = new Context(ContextKeys.SOURCE, "#animal");
|
||||
public static final Context SOURCE_TYPE_MONSTER = new Context(ContextKeys.SOURCE, "#monster");
|
||||
public static final Context SOURCE_WATER = new Context(ContextKeys.SOURCE, "minecraft:water");
|
||||
public static final Context SOURCE_WATER_1_12 = new Context(ContextKeys.SOURCE, "minecraft:flowing_water");
|
||||
|
@ -103,6 +103,24 @@ public void registerDefaults() {
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_TYPE_ANIMAL);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("animal-block-modify")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_ANIMAL_BLOCK_MODIFY)
|
||||
.group("admin")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_MODIFY)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.TARGET_TYPE_ANIMAL);
|
||||
this.registerCustomType(
|
||||
@ -974,6 +992,24 @@ public void registerDefaults() {
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_SILVERFISH);
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("silverfish-block-infest")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.FALSE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_SILVERFISH_BLOCK_INFEST)
|
||||
.group("admin")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_MODIFY)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_TNT);
|
||||
this.registerCustomType(
|
||||
@ -1031,27 +1067,6 @@ public void registerDefaults() {
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_PLAYER);
|
||||
flagContexts.add(FlagContexts.TARGET_VILLAGER);
|
||||
flagData = new ArrayList<>();
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.INTERACT_ENTITY_SECONDARY)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("villager-farm")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_VILLAGER_FARM)
|
||||
.group("admin")
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_WITHER);
|
||||
this.registerCustomType(
|
||||
@ -1100,6 +1115,11 @@ public void registerDefaults() {
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_PLACE)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
@ -1112,6 +1132,27 @@ public void registerDefaults() {
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_PLAYER);
|
||||
flagContexts.add(FlagContexts.TARGET_VILLAGER);
|
||||
flagData = new ArrayList<>();
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.INTERACT_ENTITY_SECONDARY)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
.name("villager-trade")
|
||||
.admin(true)
|
||||
.context(ClaimContexts.USER_DEFAULT_CONTEXT)
|
||||
.defaultValue(Tristate.TRUE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_VILLAGER_TRADE)
|
||||
.group("admin")
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
// USER
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.TARGET_FARMLAND);
|
||||
@ -1203,6 +1244,17 @@ public void registerDefaults() {
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
flagContexts.add(FlagContexts.SOURCE_ENDERMAN);
|
||||
flagData = new ArrayList<>();
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
flagData.add(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_PLACE)
|
||||
.contexts(flagContexts)
|
||||
.build());
|
||||
this.registerCustomType(
|
||||
definitionBuilder
|
||||
.reset()
|
||||
@ -1212,11 +1264,7 @@ public void registerDefaults() {
|
||||
.defaultValue(Tristate.FALSE)
|
||||
.description(MessageCache.getInstance().FLAG_DESCRIPTION_CUSTOM_ENDERMAN_GRIEF)
|
||||
.group("user")
|
||||
.flagData(flagDataBuilder
|
||||
.reset()
|
||||
.flag(Flags.BLOCK_BREAK)
|
||||
.contexts(flagContexts)
|
||||
.build())
|
||||
.flagData(flagData)
|
||||
.build());
|
||||
|
||||
flagContexts = new HashSet<>();
|
||||
|
@ -57,7 +57,7 @@ public void run() {
|
||||
if (accrualPerHour > 0) {
|
||||
final Location<World> lastLocation = playerData.lastAfkCheckLocation;
|
||||
if (!player.get(VehicleData.class).isPresent() &&
|
||||
(lastLocation == null || lastLocation.getPosition().distanceSquared(player.getLocation().getPosition()) > (blockMoveThreshold * blockMoveThreshold))) {
|
||||
(lastLocation == null || lastLocation.getPosition().distanceSquared(player.getLocation().getPosition()) >= (blockMoveThreshold * blockMoveThreshold))) {
|
||||
int accruedBlocks = playerData.getBlocksAccruedPerHour() / 12;
|
||||
if (accruedBlocks < 0) {
|
||||
accruedBlocks = 1;
|
||||
|
@ -3,9 +3,9 @@
|
||||
"libraries": [
|
||||
{
|
||||
"name": "com.griefdefender:adapter-sponge:1.12.2",
|
||||
"sha1": "983d82c6eca1216ab68f1747d518cc314066ad4d",
|
||||
"path": "com/griefdefender/adapter-sponge/1.12.2-SNAPSHOT/adapter-sponge-1.12.2-20201225.041422-15.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter-sponge/1.12.2-SNAPSHOT/adapter-sponge-1.12.2-20201225.041422-15.jar"
|
||||
"sha1": "beb43662d4d04825a35dcdf21eb16b18424e93d6",
|
||||
"path": "com/griefdefender/adapter-sponge/1.12.2-SNAPSHOT/adapter-sponge-1.12.2-20210101.010513-16.jar",
|
||||
"url": "https://repo.glaremasters.me/repository/bloodshot/com/griefdefender/adapter-sponge/1.12.2-SNAPSHOT/adapter-sponge-1.12.2-20210101.010513-16.jar"
|
||||
},
|
||||
{
|
||||
"name": "com.griefdefender:api:1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user