Skip to content

NullPointerException in RealisticSurvival during player login when handling BaubleChangeEventย #53

@IOVEYOUMC0

Description

@IOVEYOUMC0

โ— Checklist

  • I am using the official version of Realistic Survival and did not modify the jar.
  • I am using an up-to-date "dev-build" (not "Spigot") version of Realistic Survival.
  • I know that issues related to other plugins need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

๐Ÿ“ Description

Description:
A NullPointerException occurs in RealisticSurvival v1.2.9 when processing BaubleChangeEvent during player login. The error happens because BaubleChangeEvent.getPlayer() returns null, but the plugin attempts to call getUniqueId() on this null value. This error cascade begins when WorldGuard tries to set a player's game mode during login, triggering RealisticSurvival's event handlers that lack proper null checks.

๐Ÿ“‘ Reproduction Steps

Steps to Reproduce:

  1. Install RealisticSurvival v1.2.9 with WorldGuard 7.0.12 and WorldEdit 7.3.9
  2. Configure WorldGuard regions with game-mode flags
  3. Have player join server
  4. WorldGuard triggers game mode change during login
  5. RealisticSurvival attempts to handle BaubleChangeEvent with null player

๐Ÿ’ก Expected Behavior

Players will not report errors when they join the game

๐Ÿ“ท Screenshots / Videos

No response

๐Ÿ“œ Server Log

No response

๐Ÿ’ป Server Software

Purpur

๐ŸŽฎ Minecraft Version

1.20.x

โญ Realistic Survival version

RealisticSurvival v1.2.9-RELEASE

๐Ÿงญ Other plugins

WorldGuard 7.0.12, WorldEdit 7.3.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    ๐ŸŽฏ Needs testingThis Issue needs to be tested by our team to see if it can be reproduced.๐Ÿž Bug ReportA bug that needs to be fixed.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions