Grief Prevention

Grief Prevention

1M Downloads

private points accrual has stopped for some players

Troyka33 opened this issue · 4 comments

commented

Observed Behavior

good day!
noticed that for some (I didn't find a dependency, it feels like it's random) players the accrual of private points stops.

Expected Behavior

In the debug it says something like this:
23:54 Troyka333 wasn't active enough to accrue claim blocks this round.
Although the player was not AFK, I followed specifically.
At the same time, AFK players get their points:
23:54 Delivering 25 blocks to Troyka444

it is expected that afk players will not receive points, but those who are active will receive them

Reproduction steps

start the server and watch the players

Stack trace or error log

Server version

[13:38:47 INFO]: This server is running Purpur version 1.21.8-2495-HEAD@db12e9b (2025-09-04T01:08:56Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
* You are 1 version(s) behind
Download the new version at: https://purpurmc.org/downloads
Previous: 1.21.8-2491-8a5d2c8 (MC: 1.21.8)

GriefPrevention version

[13:39:19 INFO]: GriefPrevention version 17.0.0-58-g03ef2d8

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
  Claims:
    Mode:
      world: Survival
      world_nether: Survival
      world_the_end: Survival
    PreventGlobalMonsterEggs: true
    PreventTheft: true
    ProtectCreatures: true
    PreventButtonsSwitches: true
    LockWoodenDoors: true
    LockTrapDoors: true
    LockFenceGates: true
    EnderPearlsRequireAccessTrust: false
    RaidTriggersRequireBuildTrust: true
    ProtectHorses: true
    ProtectDonkeys: true
    ProtectLlamas: true
    InitialBlocks: 250
    Claim Blocks Accrued Per Hour:
      Default: 150
    Max Accrued Claim Blocks:
      Default: 120000
    AbandonReturnRatio: 1.0
    AutomaticNewPlayerClaimsRadius: -1
    AutomaticNewPlayerClaimsRadiusMinimum: 0
    ExtendIntoGroundDistance: 70
    MinimumWidth: 5
    MinimumArea: 100
    MaximumDepth: -2147483648
    InvestigationTool: STICK
    ModificationTool: GOLDEN_SHOVEL
    Expiration:
      ChestClaimDays: 0
      AllClaims:
        DaysInactive: 0
        ExceptWhenOwnerHasTotalClaimBlocks: 10000
        ExceptWhenOwnerHasBonusClaimBlocks: 5000
    AllowTrappedInAdminClaims: true
    MaximumNumberOfClaimsPerPlayer: 0
    VillagerTradingRequiresPermission: true
    CommandsRequiringAccessTrust: /sethome
    DeliverManuals: false
    ManualDeliveryDelaySeconds: 30
    RavagersBreakBlocks: true
    FireSpreadsInClaims: false
    FireDamagesInClaims: false
    LecternReadingRequiresAccessTrust: false
  Spam:
    Enabled: false
    LoginCooldownSeconds: 60
    LoginLogoutNotificationsPerMinute: 5
    ChatSlashCommands: /me;/global;/local
    WhisperSlashCommands: /tell;/pm;/r;/whisper;/msg
    WarningMessage: Please reduce your noise level.  Spammers will be banned.
    BanOffenders: false
    BanMessage: Banned for spam.
    AllowedIpAddresses: 1.2.3.4; 5.6.7.8
    DeathMessageCooldownSeconds: 120
    Logout Message Delay In Seconds: 0
  PvP:
    RulesEnabledInWorld:
      world: true
      world_nether: true
      world_the_end: true
    ProtectFreshSpawns: true
    PunishLogout: true
    CombatTimeoutSeconds: 15
    AllowCombatItemDrop: true
    BlockedSlashCommands: /home;/vanish;/spawn;/tpa
    ProtectPlayersInLandClaims:
      PlayerOwnedClaims: true
      AdministrativeClaims: true
      AdministrativeSubdivisions: true
    AllowLavaDumpingNearOtherPlayers:
      PvPWorlds: true
      NonPvPWorlds: false
    AllowFlintAndSteelNearOtherPlayers:
      PvPWorlds: true
      NonPvPWorlds: false
    ProtectPetsOutsideLandClaims: false
  ProtectItemsDroppedOnDeath:
    PvPWorlds: false
    NonPvPWorlds: true
  BlockLandClaimExplosions: true
  BlockSurfaceCreeperExplosions: true
  BlockSurfaceOtherExplosions: true
  LimitSkyTrees: true
  LimitTreeGrowth: false
  PistonMovement: CLAIMS_ONLY
  PistonExplosionSound: true
  FireSpreads: false
  FireDestroys: false
  AdminsGetWhispers: true
  AdminsGetSignNotifications: true
  VisualizationAntiCheatCompatMode: false
  SmartBan: false
  Mute New Players Using Banned Words: true
  MaxPlayersPerIpAddress: 4
  SilenceBans: true
  EndermenMoveBlocks: false
  SilverfishBreakBlocks: false
  CreaturesTrampleCrops: false
  RabbitsEatCrops: true
  HardModeZombiesBreakDoors: false
  MobProjectilesChangeBlocks: false
  UseBanCommand: false
  BanCommandPattern: ban %name% %reason%
  Advanced:
    fixNegativeClaimblockAmounts: true
    ClaimExpirationCheckRate: 60
    OfflinePlayer_cache_days: 90
  Abridged Logs:
    Days To Keep: 7
    Included Entry Types:
      Social Activity: true
      Suspicious Activity: true
      Administrative Activity: false
      Debug: true
      Muted Chat Messages: false
  ConfigVersion: 1

Plugin list

[13:40:45 INFO]: ℹ Server Plugins (62):
[13:40:45 INFO]: Paper Plugins (4):
[13:40:45 INFO]:  - CommandPanels, EconomyShopGUI-Premium, emotecraft, nightcore
[13:40:45 INFO]: Bukkit Plugins (58):
[13:40:45 INFO]:  - AdvancedPortals, AdvancedRegionMarket, ajLeaderboards, AuxProtect, AzLink, BetterRTP, ChatControl, ChestShop, Chunky, Citizens
[13:40:45 INFO]:  ClearLag, CMI, CMIEInjector, CMILib, CoreProtect, Craftorithm, *EasyWhitelist, EconomyBridge, ExcellentCrates, ExcellentShop
[13:40:45 INFO]:  FarmLimiter, FastAsyncWorldEdit, GPFlags, GriefPrevention, GWarpPro, ImageFrame, InteractiveChat, Jobs, LiteBans, LuckPerms
[13:40:45 INFO]:  MilkyPixelart, MyPet, PlaceholderAPI, PlasmoVoice, PlayerPoints, ProtocolLib, PvPManager, SimpleClans, SkinsRestorer, Skript
[13:40:45 INFO]:  Skulls, squaremap, squaremap-griefprevention, squaremarker, TAB, tgbridge, TheRewards, TradeMe, TreeFeller, UltimateAutoRestart
[13:40:45 INFO]:  UltimateServerProtector, Vault, ViaBackwards, ViaVersion, VillagerOverhaul, WorldAdminZ, WorldEditSUI, WorldGuard

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

upd: On 1.21.4 and GP 16 this was not observed

commented

Just be aware you're using non-release builds which may cause things to break at any time. As long as you're aware of that you're free to use them.

I'm not sure if I changed afk logic. I may have in an effort to reduce configuration settings, hmm.

commented

Hmm, may have messed up something here b6512aa #2371

commented
isIdle = !(playerData.lastAfkCheckLocation == null || playerData.lastAfkCheckLocation.getDirection().equals(player.getLocation().getDirection()));

equates to

isIdle = playerData.lastAfkCheckLocation != null && !playerData.lastAfkCheckLocation.getDirection().equals(player.getLocation().getDirection());

Look at me, applying DeMorgan's law and actually using part of my shiny new education. What a great day.

Looking at it, yeah, the direction check should be inverted, because if their direction is changed they shouldn't be idle.