Grief Prevention

Grief Prevention

1M Downloads

[20:26:24 WARN]: [GriefPrevention] Plugin GriefPrevention v16.18.1-7-g64b348a generated an exception while executing task 124

navin-hariharan opened this issue ยท 5 comments

commented

Observed Behavior

/claim gives error in logs

Expected Behavior

claim the land with no errors

Reproduction steps

  1. /claim

Stack trace or error log

java.lang.NullPointerException: Cannot invoke "org.bukkit.block.Biome.getKey()" because "biome" is null
        at me.ryanhamshire.GriefPrevention.RestoreNatureProcessingTask.getPlayerBlocks(RestoreNatureProcessingTask.java:873) ~[?:?]
        at me.ryanhamshire.GriefPrevention.AutoExtendClaimTask.lambda$getBiomePlayerBlocks$1(AutoExtendClaimTask.java:177) ~[?:?]
        at java.util.HashMap.computeIfAbsent(HashMap.java:1220) ~[?:?]
        at me.ryanhamshire.GriefPrevention.AutoExtendClaimTask.getBiomePlayerBlocks(AutoExtendClaimTask.java:177) ~[?:?]
        at me.ryanhamshire.GriefPrevention.AutoExtendClaimTask.isPlayerBlock(AutoExtendClaimTask.java:172) ~[?:?]
        at me.ryanhamshire.GriefPrevention.AutoExtendClaimTask.findLowerBuiltY(AutoExtendClaimTask.java:140) ~[?:?]
        at me.ryanhamshire.GriefPrevention.AutoExtendClaimTask.getLowestBuiltY(AutoExtendClaimTask.java:115) ~[?:?]
        at me.ryanhamshire.GriefPrevention.AutoExtendClaimTask.run(AutoExtendClaimTask.java:100) ~[?:?]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:78) ~[forge-1.20.1-47.1.76-universal.jar%23266!/:?]
        at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:55) [forge-1.20.1-47.1.76-universal.jar%23266!/:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

Server version

This server is running Mohist version 1.20.1-407 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT, Forge version 47.4.47, NeoForge version 47.1.76)

GriefPrevention version

[20:31:27 INFO]: GriefPrevention version 16.18.1-7-g64b348a

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
    DIM-1: -1
    DIM1: -1
  Claims:
    Mode:
      world: Survival
      DIM-1: Disabled
      DIM1: Disabled
    PreventGlobalMonsterEggs: true
    PreventTheft: true
    ProtectCreatures: true
    PreventButtonsSwitches: true
    LockWoodenDoors: false
    LockTrapDoors: false
    LockFenceGates: true
    EnderPearlsRequireAccessTrust: true
    RaidTriggersRequireBuildTrust: true
    ProtectHorses: true
    ProtectDonkeys: true
    ProtectLlamas: true
    InitialBlocks: 100
    Claim Blocks Accrued Per Hour:
      Default: 100
    Max Accrued Claim Blocks:
      Default: 80000
    Accrued Idle Threshold: 0
    AccruedIdlePercent: 0
    AbandonReturnRatio: 1.0
    AutomaticNewPlayerClaimsRadius: 4
    AutomaticNewPlayerClaimsRadiusMinimum: 0
    ExtendIntoGroundDistance: 5
    MinimumWidth: 5
    MinimumArea: 100
    MaximumDepth: -2147483648
    InvestigationTool: STICK
    ModificationTool: GOLDEN_SHOVEL
    Expiration:
      ChestClaimDays: 7
      UnusedClaimDays: 14
      AllClaims:
        DaysInactive: 60
        ExceptWhenOwnerHasTotalClaimBlocks: 10000
        ExceptWhenOwnerHasBonusClaimBlocks: 5000
      AutomaticNatureRestoration:
        SurvivalWorlds: false
    AllowTrappedInAdminClaims: false
    MaximumNumberOfClaimsPerPlayer: 0
    CreationRequiresWorldGuardBuildPermission: true
    VillagerTradingRequiresPermission: true
    CommandsRequiringAccessTrust: /sethome
    DeliverManuals: true
    ManualDeliveryDelaySeconds: 30
    RavagersBreakBlocks: true
    FireSpreadsInClaims: false
    FireDamagesInClaims: false
    LecternReadingRequiresAccessTrust: true
  Spam:
    Enabled: true
    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: true
    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
      DIM-1: true
      DIM1: true
    ProtectFreshSpawns: true
    PunishLogout: true
    CombatTimeoutSeconds: 15
    AllowCombatItemDrop: false
    BlockedSlashCommands: /home;/vanish;/spawn;/tpa
    ProtectPlayersInLandClaims:
      PlayerOwnedClaims: true
      AdministrativeClaims: true
      AdministrativeSubdivisions: true
    AllowLavaDumpingNearOtherPlayers:
      PvPWorlds: true
      NonPvPWorlds: false
    AllowFlintAndSteelNearOtherPlayers:
      PvPWorlds: true
      NonPvPWorlds: false
    ProtectPetsOutsideLandClaims: false
  Economy:
    ClaimBlocksMaxBonus: 0
    ClaimBlocksPurchaseCost: 0.0
    ClaimBlocksSellValue: 0.0
  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: 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: 90
  Abridged Logs:
    Days To Keep: 7
    Included Entry Types:
      Social Activity: true
      Suspicious Activity: true
      Administrative Activity: false
      Debug: false
      Muted Chat Messages: false
  ConfigVersion: 1

Plugin list

[20:32:50 INFO]: Plugins (5): ajStartCommands, GriefPrevention, UnexpectedSpawn, BetterRTP, Mohist

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

This is a bug in the server software, it's breaking the contract of Block#getBiome by returning null. You should be reporting this to Mohist. They can return a wrapper with the correct NamespacedKey, that's exactly why Biome.CUSTOM exists.

commented

I do still want to make autoextend less dependent on restorenature stuff, but idk if I glossed over the fact that getBiome isn't supposed to return null.

commented

Yeah, personally feel like the tile check and possibly a user-configurable advanced "valuable blocks" listing would be much better. I think #2199 is a similar issue to that idea with more info.

commented

If i had to guess its happening in a nonvanilla biome which is why that error is being thrown. Just an unfortunate issue with mohist, or any hybrid server. Issues like this are just too common when you mix bukkit/paper with modded. It's just known to not be reliable.

My only recommendation is to downgrade your GriefPrevention to the latest release build 16.18.1, not use the beta version. If that doesn't fix it, you're most likely just out of luck.

commented

ya, the autoextend task still uses some restorenature logic to determine what is a player-placed block and extend the claim downwards if need be.

I may revisit how autoextend works to make it less dependent on biomes and whatnot.