LOOHP / HoloMobHealth

Display Mob Health above head through packets!
https://www.spigotmc.org/resources/75975/
GNU General Public License v3.0
14 stars 7 forks source link

[NPE] Cannot invoke "io.netty.channel.Channel.pipeline()" because "channel" is null #6

Closed joex92 closed 2 years ago

joex92 commented 3 years ago

Got this warn spamming console on latest purpur 1.17.1:

[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]: java.lang.NullPointerException: Cannot invoke "io.netty.channel.Channel.pipeline()" because "channel" is null
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at ProtocolLib.jar//com.comphenix.protocol.injector.netty.ChannelInjector.findChannelHandler(ChannelInjector.java:932)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at ProtocolLib.jar//com.comphenix.protocol.injector.netty.InjectionFactory.fromPlayer(InjectionFactory.java:93)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at ProtocolLib.jar//com.comphenix.protocol.injector.netty.ProtocolInjector$4.sendServerPacket(ProtocolInjector.java:411)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at ProtocolLib.jar//com.comphenix.protocol.injector.PacketFilterManager.sendServerPacket(PacketFilterManager.java:733)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at ProtocolLib.jar//com.comphenix.protocol.injector.PacketFilterManager.sendServerPacket(PacketFilterManager.java:687)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at HoloMobHealth-2.2.2.0.jar//com.loohp.holomobhealth.protocol.EntityMetadata.lambda$updateEntity$0(EntityMetadata.java:58)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[07:14:27] [Craft Scheduler Thread - 15 - HoloMobHealth/WARN]:  at java.base/java.lang.Thread.run(Thread.java:831)

these are the plugins:

plugman list -v
[07:56:41 INFO]: [PlugMan] Plugins (72): AdvancedArmorStands (1.17.0.0), AlwaysVoidTP (1.2.0), BetterConcrete (1.7.0), BetterGiants (2.7), BetterNav (1.0.7), BetterSleeping4 (4.0.0), BKCommonLib (1.17.1-v1), BloodNight (0.10.7), Bookshelf (3.0.6.3), Citizens (2.0.28-SNAPSHOT (build 2359)), CMILib (1.0.3.7), Coins (1.10.8), CustomCrafting (1.7.1.3), DailyRewards (1.1.0), DeadSouls (1.6), DualWield (2.2), EconomyShopGUI (3.7.1), Essentials (2.19.0), EssentialsChat (2.19.0), EssentialsDiscord (2.19.0), EssentialsGeoIP (2.19.0), EssentialsSpawn (2.19.0), Evolutions (1.1.4), ExtractableEnchantments (8.3), FastAsyncWorldEdit (1.17-199;4bf2781), Geyser-Spigot (1.4.2-SNAPSHOT), GriefPrevention (16.17.1-25-g4f95938), Healthy (v3.0.0-alpha), Herobrine (2.2.1), HolographicDisplays (2.4.9), HoloMobHealth (2.2.2.1), Images (2.2.3), InteractionVisualizer (1.16.3.12), Jobs (5.0.0.6), LocketteX (1.6.8), LuckPerms (5.3.55), mcMMO (2.1.201-SNAPSHOT), MobsToEggs (1.5.5_5), MoreMobHeads (1.15_1.0.21), Multiverse-CommandDestination (1.2.2), Multiverse-Core (4.3.1-SNAPSHOT-b854), Multiverse-Inventories (4.2.2-SNAPSHOT-bUNKNOWN), Multiverse-NetherPortals (4.2.2-SNAPSHOT-b801), Multiverse-Portals (4.2.2-SNAPSHOT-b848), MusicBox (2.0.5), NexEngine (2.0.7.4), NoteBlockAPI (2.0-SNAPSHOT), Pl3xMap (1.0.0-BETA-162), PlaceholderAPI (2.10.10), PlotSquared (6.0.10-SNAPSHOT), PlugMan (2.2.5), ProtocolLib (4.7.0), SecurityLog (1.5), Shopkeepers (2.13.3), ShulkerPacks (1.5.15), SmoothTimber (1.17.8), StayPut (1.2.1), SternalBoard (1.3.8), TabTPS (1.3.10), Tamablefoxes (2.1.5-SNAPSHOT), Tweakin (3.1.5), Vault (1.7.3-b131), ViaBackwards (4.0.1), ViaRewind (2.0.1), ViaVersion (4.0.1), VoidGen (2.0), Wardrobe (1.4.2), Wild (2.29-7da6164), WolfyUtilities (1.7.3.0), WorldEditSelectionVisualizer (2.1.0), WorldGuard (7.0.5+3827266), WowSuchCleaner (1.9.2)

here's the latest.log file... and here's the config.yml:

Display:
  # The text to display above the mob
  # Placeholders:
  # {Health_<DecimalFormat>}
  # {MaxHealth_<DecimalFormat>}
  # {PercentageHealth_<DecimalFormat>}
  # 
  # Example of DecimalFormat:
  # {Health_0.0} = Health with 1 decimal point
  # {MaxHealth_,0.00} = Health formatted with commas with 2 decimal points
  # 
  # For more info:
  # https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html
  # 
  # Supports custom mob names of supported plugins if enabled
  # {Mob_Type}
  # {Mob_Name}
  # {Mob_Type_Or_Name}
  # 
  # These placeholders can be further configurated
  # {DynamicColor}
  # {ScaledSymbols}
  # 
  # Only one line is allowed (Unless you enabled ***EXPERIMENTAL*** multi-line which is not recommended)
  Text:
    - '{ScaledSymbols}'
    - If Multiline is enabled, you will see this line
  # Settings for the {DynamicColor} Placeholder
  DynamicColorSettings:
    # Color that represents more than 66.67% of health
    HealthyColor: '&a'
    # Color that represents between 33.33% and 66.67% of health
    HalfColor: '&e'
    # Color that represents below 33.33% of health
    LowColor: '&c'
  # Settings for the {ScaledSymbols} Placeholder
  ScaledSymbolSettings:
    # How many of these symbols are considered max health
    Scale: 100
    # If DynamicScale is set to true, entities with health lower than the Scale setting
    # will use the amount of hearts it has rather than the Scale setting
    DynamicScale: true
    # Character used for hearts that represents remaining health
    HealthyChar: '&c❤'
    # Character used for hearts that represents remaining health
    HalfChar: '&e❤'
    # Character used for hearts that represents lost health
    EmptyChar: '&7❤'
Options:
  # Number Rounding Mode
  # Accepts UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_EVEN, HALF_DOWN
  NumberRounding: UP
  # Health always visible when in range or only visible when the player is looking at the mob
  AlwaysShow: true
  # Whether or not named mobs should so had their name replaced to show health
  # The name is not actually replaced on the server side, only client side
  # Does not work well with AlwaysShow set to false
  ApplyToNamed: true
  # Do not use plugin in these worlds
  DisabledWorlds:
    - disabled_world
  # Do not apply health to these mob types
  # https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
  DisabledMobTypes: []
  # Do not apply health to mob with these name
  # The name has to be completely equal to this list including color codes
  # Use "&" as color code
  DisabledMobNamesAbsolute: []
  # Do not apply health to mob with these name
  # The name only has to contain these strings EXCLUDING color codes AND case
  # Color codes are ignored
  DisabledMobNamesContains:
    - PhantomShield
  # Settings for an alternate way of showing health
  DynamicHealthDisplay:
    # Whether or not HoloMobHealth should only apply health display when the mob is taking damage
    Use: true
    # How long should health be shown after the mob has been attack (in seconds)
    Timeout: 3
    # Should health be triggered only from attacks from players
    OnlyPlayerTrigger: false
    IdleDisplay:
      # Whether to display an alternative foramt when a mob is not taking damage
      Use: true
      # Placeholders are the same as the main display
      Text:
        - '{DynamicColor}{Health_0.0}&f/{MaxHealth_0.0}'
        - If Multiline is enabled, you will see this line
  # Settings for the range detection module
  # Note that disabling it saves performance
  # Restart to see changes
  Range:
    Use: false
    Distance: 15
    # Refresh rate of the detection of mobs within range in ticks
    # 20 ticks = 1 second
    UpdateRate: 20
  # The default language
  # Doesn't do anything on Minecraft 1.13+
  Language: en_us
  # Enable EXPERIEMENTAL multi-line mob name tag
  # Note that it is a bit more performance heavy
  # Y-Offset is measured in Steps, accept only integers, experiment with the numbers to find one that is suitable for you
  # Name match is in Regex, be careful with special meta characters
  # YOU MUST RESTART TO SEE CHANGES
  MultiLine:
    Enable: false
    MasterYOffset: 0
    Special:
      - Name:^Special Name:2
      - Type:ENDERMITE:1
DamageIndicator:
  # Whether the damage indicator module should be used
  Enabled: true
  # Should the damage indicator only be triggered by player actions
  OnlyPlayerTriggered: false
  # Visible range of the indicator
  VisibleRange: 64
  # When will the indicator disappear
  # In ticks -> 20 ticks = 1 second
  Timeout: 40
  Damage:
    # Should the damage indicator be enabled for health losts
    Enabled: true
    # Play the indicator animation
    Animation: true
    # Where should the number spawn
    Y-Offset: 0
    # Minimum amount of health changed in order to trigger
    Minimum: 0.5
    # The text which will be displayed
    # Placeholders are the same as the main display with these additional placeholders:
    # {Indicator_<DecimalFormat>} <- to show the amount of health lost/gained
    HoloText: '&c&l{Indicator_0.#}'
  Regen:
    # Should the damage indicator be enabled for health gains
    Enabled: true
    # Play the indicator animation
    Animation: true
    # Where should the number spawn
    Y-Offset: 0
    # Minimum amount of health changed in order to trigger
    Minimum: 0.5
    # The text which will be displayed
    # Placeholders are the same as the main display with these additional placeholders:
    # {Indicator_<DecimalFormat>} <- to show the amount of health lost/gained
    HoloText: '&a&l{Indicator_0.#}'
Hooks:
  Citizens:
    # Whether HoloMobHealth should show health for citizens NPCs (applies to mobs only)
    ShowNPCMobHealth: false
  MythicMobs:
    # Whether HoloMobHealth should show health for MythicMobs (applies to mobs only)
    ShowMythicMobsHealth: false
  Shopkeepers:
    # Whether HoloMobHealth should show health for Shopkeepers (applies to mobs only)
    ShowShopkeepersHealth: false
  MyPet:
    # Whether HoloMobHealth should show health for MyPet pets (applies to mobs only)
    ShowMyPetHealth: false
Messages:
  ReloadPlugin: '&aHoloMobHealth has been reloaded!'
  NoPermission: '&cYou do not have permission to use that command!'
  PlayersOnly: '&cThis can only be ran as a player!'
  PlayerNotFound: '&cThat player is not online!'
  ToggleDisplayOn: '&aEnabled Mob Health Display!'
  ToggleDisplayOff: '&cDisabled Mob Health Display!'
CustomPlaceholderScript:
  SilentClassNotFound: true
  AdditionClasses:
    MythicMobs: io.lumine.xikage.mythicmobs.MythicMobs
Database:
  # Player data storage type, MYSQL or SQLITE
  Type: SQLITE
  MYSQL:
    Host: localhost
    Port: 3306
    Database: HoloMobHealth
    Username: mysql
    Password: password
Updater:
  Enable: true
joex92 commented 3 years ago

The plugin seems to be working fine, but it keeps spamming the console with that warn...

LOOHP commented 3 years ago

Does it happen when you only have HoloMobHealth and its dependencies installed on a test server?

joex92 commented 3 years ago

Does it happen when you only have HoloMobHealth and its dependencies installed on a test server?

well, that was a test server, and the plugins were just added, I´ll try with only MMH and its dependencies...

LOOHP commented 2 years ago

Closed for inactivity