Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1871

Closed
Open
Created Mar 22, 2025 by EyatMC@EyatMC

Console Error When Using Placeholder for Custom Stat in MythicMobs

Summary

When I attack a mob that has been set up as intended, an error appears in the console. However, the functionality still works correctly. The issue is that the console error message is bothersome.

Steps to reproduce

  1. Define a custom stat in stats.yml.
  2. Set the ARMOR_DE value for the mob in mob.yml.
  3. Use a placeholder to retrieve the mob's ARMOR_DE in skill.yml.
  4. Spawn the mob in-game and use a skill to attack.
  5. Check the console for error messages.

skill.yml

mob.yml

stats.yml

Current behavior

The mob functions as intended.

However, when attacking the mob, an error appears in the console.

The error message indicates a NullPointerException, suggesting that the entity reference is null when attempting to process <target.stat.ARMOR_DE>.

Intended correct behavior

No error should appear in the console when attacking the mob.

Placeholders should function properly without issues.

Server log file

logs

Debug log snippet

logs/errors

Proposed fixes

It could be caused by the entity reference becoming null at some point during placeholder processing.

Perhaps a fallback check should be implemented to ensure the entity is valid before using placeholders.

Edited Mar 22, 2025 by EyatMC
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking