Grief Prevention

Grief Prevention

1M Downloads

Damage to tamed animals v16.18.2-beta1

SrBedrock opened this issue · 6 comments

commented

Observed Behavior

It is possible to damage tamed animals inside protections such as wolf, parrot, cat and etc.

Expected Behavior

Not being able to kill tamed mobs inside protection.

Reproduction steps

  1. Player A protects a place where there is a wolf that he has tamed.
  2. Player B who has no permissions in the protection attacks the animal and damages the tamed animal.

Stack trace or error log

No response

Server version

Current: git-Purpur-2023 (MC: 1.20.1)*

GriefPrevention version

[GriefPrevention 16.18.2-beta1](https://github.com/TechFortress/GriefPrevention/releases/tag/16.18.2-beta1)

Configuration

# Default values are perfect for most servers.  If you want to customize and have a question, look for the answer here first: http://dev.bukkit.org/bukkit-plugins/grief-prevention/pages/setup-and-configuration/

GriefPrevention:
  SeaLevelOverrides:
    world_nether: -1
    world_the_end: -1
    world: -1
  Claims:
    Mode:
      world_nether: Disabled
      world_the_end: Disabled
      world: Survival
    PreventGlobalMonsterEggs: true
    PreventTheft: true
    ProtectCreatures: true
    PreventButtonsSwitches: true
    LockWoodenDoors: true
    LockTrapDoors: true
    LockFenceGates: true
    EnderPearlsRequireAccessTrust: true
    RaidTriggersRequireBuildTrust: true
    ProtectHorses: true
    ProtectDonkeys: true
    ProtectLlamas: true
    InitialBlocks: 1000
    Claim Blocks Accrued Per Hour:
      Default: 200
    Max Accrued Claim Blocks:
      Default: 10000000
    Accrued Idle Threshold: 1
    AccruedIdlePercent: 1
    AbandonReturnRatio: 1.0
    AutomaticNewPlayerClaimsRadius: 15
    AutomaticNewPlayerClaimsRadiusMinimum: 10
    ExtendIntoGroundDistance: 384
    MinimumWidth: 10
    MinimumArea: 100
    MaximumDepth: -2147483648
    InvestigationTool: STICK
    ModificationTool: GOLDEN_SHOVEL
    Expiration:
      ChestClaimDays: -1
      UnusedClaimDays: -1
      AllClaims:
        DaysInactive: -1
        ExceptWhenOwnerHasTotalClaimBlocks: 10000000
        ExceptWhenOwnerHasBonusClaimBlocks: 10000000
      AutomaticNatureRestoration:
        SurvivalWorlds: false
    AllowTrappedInAdminClaims: true
    MaximumNumberOfClaimsPerPlayer: 0
    CreationRequiresWorldGuardBuildPermission: true
    VillagerTradingRequiresPermission: true
    CommandsRequiringAccessTrust: /clan base definir;/sethome;/pwarp definir;/marry sethome;/tpaccept;/go definir
    DeliverManuals: true
    ManualDeliveryDelaySeconds: 30
    RavagersBreakBlocks: true
    FireSpreadsInClaims: false
    FireDamagesInClaims: false
    LecternReadingRequiresAccessTrust: true
  Spam:
    Enabled: false
    LoginCooldownSeconds: 60
    LoginLogoutNotificationsPerMinute: 1
    ChatSlashCommands: /me;/global;/g;/l;/local
    WhisperSlashCommands: /tell;/pm;/r;/whisper;/msg;/m
    WarningMessage: Diminua a quantidade de mensagens. Spammers serão banidos!
    BanOffenders: false
    BanMessage: Banido por spam.
    AllowedIpAddresses: 1.2.3.4; 5.6.7.8
    DeathMessageCooldownSeconds: 10
    Logout Message Delay In Seconds: 0
  PvP:
    RulesEnabledInWorld:
      world: true
      world_nether: true
      world_the_end: true
      evento: true
      world_duelo: true
      world_recurso: true
      world_batalha: true
      world_2: true
      world_evento: true
    ProtectFreshSpawns: false
    PunishLogout: false
    CombatTimeoutSeconds: -1
    AllowCombatItemDrop: true
    BlockedSlashCommands: ''
    ProtectPlayersInLandClaims:
      PlayerOwnedClaims: true
      AdministrativeClaims: true
      AdministrativeSubdivisions: true
    AllowLavaDumpingNearOtherPlayers:
      PvPWorlds: false
      NonPvPWorlds: false
    AllowFlintAndSteelNearOtherPlayers:
      PvPWorlds: false
      NonPvPWorlds: false
    ProtectPetsOutsideLandClaims: false
  Economy:
    ClaimBlocksMaxBonus: 10000000
    ClaimBlocksPurchaseCost: 10.0
    ClaimBlocksSellValue: 8.0
  ProtectItemsDroppedOnDeath:
    PvPWorlds: false
    NonPvPWorlds: false
  BlockLandClaimExplosions: true
  BlockSurfaceCreeperExplosions: true
  BlockSurfaceOtherExplosions: true
  LimitSkyTrees: true
  LimitTreeGrowth: false
  PistonMovement: CLAIMS_ONLY
  PistonExplosionSound: true
  FireSpreads: false
  FireDestroys: false
  AdminsGetWhispers: false
  AdminsGetSignNotifications: false
  VisualizationAntiCheatCompatMode: false
  SmartBan: false
  Mute New Players Using Banned Words: false
  MaxPlayersPerIpAddress: 5
  SilenceBans: true
  Siege:
    Worlds: []
    BreakableBlocks:
    - ACACIA_PLANKS
    - BIRCH_PLANKS
    - BLACK_WOOL
    - BLUE_WOOL
    - BROWN_WOOL
    - COBBLESTONE
    - CYAN_WOOL
    - DARK_OAK_PLANKS
    - DEAD_BUSH
    - DIRT
    - FERN
    - GLASS
    - GLASS_PANE
    - GRASS
    - GRASS_BLOCK
    - GRAVEL
    - GRAY_WOOL
    - GREEN_WOOL
    - JUNGLE_PLANKS
    - LIGHT_BLUE_WOOL
    - LIGHT_GRAY_WOOL
    - LIME_WOOL
    - MAGENTA_WOOL
    - OAK_PLANKS
    - ORANGE_WOOL
    - PINK_WOOL
    - PURPLE_WOOL
    - RED_WOOL
    - SAND
    - SNOW
    - SPRUCE_PLANKS
    - WHITE_WOOL
    - YELLOW_WOOL
    DoorsOpenDelayInSeconds: 300
    CooldownEndInMinutes: 60
  EndermenMoveBlocks: false
  SilverfishBreakBlocks: false
  CreaturesTrampleCrops: false
  RabbitsEatCrops: true
  HardModeZombiesBreakDoors: false
  Database:
    URL: ''
    UserName: ''
    Password: ''
  UseBanCommand: false
  BanCommandPattern: ban %name% %reason%
  Advanced:
    fixNegativeClaimblockAmounts: true
    ClaimExpirationCheckRate: 10
    OfflinePlayer_cache_days: 160
  Abridged Logs:
    Days To Keep: 7
    Included Entry Types:
      Social Activity: false
      Suspicious Activity: false
      Administrative Activity: true
      Debug: true
      Muted Chat Messages: false
  ConfigVersion: 1

Plugin list

GriefPrevention

Running without GriefPrevention

  • I attempted running the server without GriefPrevention installed.
  • The problem does not occur when GriefPrevention is removed from the server.

Running with only GriefPrevention

  • I attempted running only GriefPrevention on the server.
  • The issue still occurs when GriefPrevention is the only plugin running.

Running on a fresh, clean server installation

  • I attempted testing for the issue on a new server.
  • The issue still occurs on a new server.

Using unmodified client

  • I attempted testing for the issue with the vanilla client.
  • The issue still occurs when using the vanilla client.

We appreciate you taking the time to fill out a bug report!

  • I searched for similar issues before submitting this bug report.
commented

@Jikoo I believe it is due to the changes made by your PR, trying to damage ownerless domesticable animals inside a protection is not possible, it only happens if the animal has an owner.

commented

I'm not seeing this with build 779be88, but I have PvP.RulesEnabledInWorld set to false for all my worlds. So maybe GP's PVP rules have to be enabled.

commented

This is specific to PVP rules. I did note that the changes also resulted in untamed wolves always being protected where they previously were not. Unsure if that is PVP-specific, didn't test yet.

commented

I will carry out further tests to get more information.

commented

Don't worry about it, I've got an environment running now for this, had to do a bit of debugging to figure out where I went wrong. Turns out it's likely just a bad blanket return value, but the one wolf condition may need to be relocated.

/e: Yeah, okay, untamed wolves are also not supposed to be protected.

commented

I think the philosophy is that wolves can attack the player, so the player needs to be able to defend himself.