Grief Prevention

Grief Prevention

1M Downloads

Lightning Strikes generated from plugins can alter pets/entities existing in the claim

TreemanKing opened this issue ยท 3 comments

commented

Observed Behavior

Lightning strike summoned by a plugin or command will do damage (minecarts etc or ignite entities such as cats) in claims.
https://github.com/GriefPrevention/GriefPrevention/assets/67459602/33249f35-cedb-478f-84aa-47182b543052

Expected Behavior

These events should be cancelled when struck in a claim.

Reproduction steps

  1. Place a minecart in someone's claim
  2. Use /summon lightningbolt as seen in the video in observed behaviour.
  3. Watch entity die.

I looked up the code and identified that it only works for Trident Lightning (#417) and not external lightning caused by plugins or commands. I was thinking whether it'd be worthwhile disabling the LightningStrikeEvent all together (I know it activates after the BlockIgniteEvent but should it look at the Lightning Strike as well? That's up for discussion.)

Stack trace or error log

No error logs.

Server version

This server is running Paper version git-Paper-422 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: cde5587)
You are 8 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: git-Paper-81 (MC: 1.19)

GriefPrevention version

GriefPrevention version da38fbd

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: -1
    world_nether: -1
    world_the_end: -1
    world_minigames: -1
    world_market: -1
    world_resource_nether: -1
    world_parkour_end: -1
    world_prestige_final: -1
    world_raid_ice: -1
    world_dungeons: -1
    world_guilds: -1
    world_raid_jungle: -1
    world_resource: -1
    world_spawn: -1
    world_prestige_dungeon: -1
  Claims:
    Mode:
      world_parkour_end: Disabled
      world_raid_ice: Survival
      world_market: Survival
      world_guilds: Survival
      world_resource: Survival
      world_spawn: Survival
      world_minigames: Survival
      world_raid_jungle: Survival
      world_resource_nether: Disabled
      world_nether: Survival
      world_prestige_final: Survival
      world_dungeons: Survival
      world_the_end: Survival
      world_prestige_dungeon: 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: 200
    Claim Blocks Accrued Per Hour:
      Default: 100
    Max Accrued Claim Blocks:
      Default: 50000
    Accrued Idle Threshold: 0
    AccruedIdlePercent: 0
    AbandonReturnRatio: 1.0
    AutomaticNewPlayerClaimsRadius: -1
    AutomaticNewPlayerClaimsRadiusMinimum: 0
    ExtendIntoGroundDistance: 100
    MinimumWidth: 5
    MinimumArea: 4
    MaximumDepth: -64
    InvestigationTool: STICK
    ModificationTool: GOLDEN_SHOVEL
    Expiration:
      ChestClaimDays: 30
      UnusedClaimDays: 100
      AllClaims:
        DaysInactive: 100
        ExceptWhenOwnerHasTotalClaimBlocks: 1500
        ExceptWhenOwnerHasBonusClaimBlocks: 4000
      AutomaticNatureRestoration:
        SurvivalWorlds: false
    AllowTrappedInAdminClaims: false
    MaximumNumberOfClaimsPerPlayer: 100000
    CreationRequiresWorldGuardBuildPermission: true
    VillagerTradingRequiresPermission: true
    CommandsRequiringAccessTrust: /sethome;/createhome;/esethome;/ecreatehome;/essentials:sethome;/essentials:createhome;
    DeliverManuals: true
    ManualDeliveryDelaySeconds: 30
    RavagersBreakBlocks: true
    FireSpreadsInClaims: false
    FireDamagesInClaims: false
    LecternReadingRequiresAccessTrust: true
  Spam:
    Enabled: false
    LoginCooldownSeconds: 0
    LoginLogoutNotificationsPerMinute: 30
    ChatSlashCommands: /me;/global;/local;/afk;/communism;/pay;/epay;/essentials:pay;/essentials:epay;
    WhisperSlashCommands: /tell;/etell;/essentials:tell;/essentials:etell;/pm;/epm;/essentials:pm;/essentials:epm;/r;/er;/essentials:r;/essentials:er;/whisper;/ewhisper;/essentials:whisper;/essentials:ewhisper;/msg;/emsg;/essentials:msg;/essentials:emsg;/w;/essentials:w;/minecraft:w;/minecraft:tell;
    WarningMessage: pls no spam
    BanOffenders: false
    BanMessage: pls no spam
    AllowedIpAddresses: 1.2.3.4; 5.6.7.8
    DeathMessageCooldownSeconds: 0
    Logout Message Delay In Seconds: 0
  PvP:
    RulesEnabledInWorld:
      world: true
      world_nether: true
      world_the_end: true
      world_minigames: true
      world_market: false
      world_resource_nether: true
      world_parkour_end: true
      world_prestige_final: true
      world_raid_ice: true
      world_dungeons: true
      world_guilds: false
      world_raid_jungle: true
      world_resource: true
      world_spawn: false
      world_prestige_dungeon: true
    ProtectFreshSpawns: false
    PunishLogout: false
    CombatTimeoutSeconds: 15
    AllowCombatItemDrop: true
    BlockedSlashCommands: /heal;/eheal;/essentials:heal;/essentials:eheal;/fly;/efly;/essentials:fly;/essentials:efly;
    ProtectPlayersInLandClaims:
      PlayerOwnedClaims: true
      AdministrativeClaims: true
      AdministrativeSubdivisions: true
    AllowLavaDumpingNearOtherPlayers:
      PvPWorlds: true
      NonPvPWorlds: false
    AllowFlintAndSteelNearOtherPlayers:
      PvPWorlds: true
      NonPvPWorlds: false
    ProtectPetsOutsideLandClaims: true
  Economy:
    ClaimBlocksMaxBonus: 0
    ClaimBlocksPurchaseCost: 20.0
    ClaimBlocksSellValue: 0.0
  ProtectItemsDroppedOnDeath:
    PvPWorlds: false
    NonPvPWorlds: true
  BlockLandClaimExplosions: true
  BlockSurfaceCreeperExplosions: true
  BlockSurfaceOtherExplosions: false
  LimitSkyTrees: false
  LimitTreeGrowth: false
  PistonMovement: EVERYWHERE_SIMPLE
  PistonExplosionSound: true
  FireSpreads: false
  FireDestroys: false
  AdminsGetWhispers: false
  AdminsGetSignNotifications: true
  VisualizationAntiCheatCompatMode: false
  SmartBan: true
  Mute New Players Using Banned Words: true
  MaxPlayersPerIpAddress: 3
  SilenceBans: true
  Siege:
    Worlds: []
    BreakableBlocks:
    - GRASS_BLOCK
    - DIRT
    - COBBLESTONE
    - OAK_PLANKS
    - SPRUCE_PLANKS
    - BIRCH_PLANKS
    - JUNGLE_PLANKS
    - ACACIA_PLANKS
    - DARK_OAK_PLANKS
    - SAND
    - GRAVEL
    - GLASS
    - GRASS
    - FERN
    - DEAD_BUSH
    - WHITE_WOOL
    - ORANGE_WOOL
    - MAGENTA_WOOL
    - LIGHT_BLUE_WOOL
    - YELLOW_WOOL
    - LIME_WOOL
    - PINK_WOOL
    - GRAY_WOOL
    - LIGHT_GRAY_WOOL
    - CYAN_WOOL
    - PURPLE_WOOL
    - BLUE_WOOL
    - BROWN_WOOL
    - GREEN_WOOL
    - RED_WOOL
    - BLACK_WOOL
    - SNOW
    - GLASS_PANE
    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: 60
    OfflinePlayer_cache_days: 365
  Abridged Logs:
    Days To Keep: 365
    Included Entry Types:
      Social Activity: true
      Suspicious Activity: true
      Administrative Activity: false
      Debug: false
      Muted Chat Messages: true
  ConfigVersion: 1

Plugin list

Bukkit Plugins:
Essentials, GriefPrevention, LuckPerms, PlaceholderAPI, PlugManX, Vault, ViaBackwards, ViaVersion

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

Not sure that GP does much of anything for any plugins or commands that perform direct actions. Usually these are seen as administrative actions, or that the plugin knows what they're doing.

commented

Well it's just technically summoning a lightning strike more accurately at the entity so it really is more so a Minecraft issue.

It's just easier to replicate with the plugin summoning and occurs more frequently compared to the weather chance of summoning a lightning strike on an entity.

commented

ya unless we wanna add wilderness protections, I don't see a need, given that other things (e.g. creeper explosions and the like) aren't blocked for at least entity damage. I'd like to regulate wilderness 'grief' to addons as I consider that to be minecraft mechanics rather than intentional player-initiated grief/sabotage