survanetwork / HotBlock

🔲 A funny PvP Minigame
https://plugins.surva.net/#hotblock
MIT License
23 stars 15 forks source link

Messages bug #51

Closed UnknownNull closed 1 year ago

UnknownNull commented 1 year ago

❗️ Please describe the issue

2023-09-08 [14:55:51.504] [Server thread/INFO]: Preparing world "hotblock" 2023-09-08 [14:55:51.756] [Server thread/CRITICAL]: Error: "Typed property surva\hotblock\HotBlock::$translationMessages must not be accessed before initialization" (EXCEPTION) in "plugins/HotBlock-master/src/surva/hotblock/HotBlock" at line 180 --- Stack trace ---

0 plugins/HotBlock-master/src/surva/hotblock/utils/Messages(48): surva\hotblock\HotBlock->getTranslationMessages()

1 plugins/HotBlock-master/src/surva/hotblock/tasks/PlayerBlockCheckTask(47): surva\hotblock\utils\Messages->getMessage(string[11] ground.safe)

2 pmsrc/src/scheduler/TaskHandler(113): surva\hotblock\tasks\PlayerBlockCheckTask->onRun()

3 pmsrc/src/scheduler/TaskScheduler(137): pocketmine\scheduler\TaskHandler->run()

4 pmsrc/src/plugin/PluginManager(530): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(int 261721)

5 pmsrc/src/Server(1811): pocketmine\plugin\PluginManager->tickSchedulers(int 261721)

6 pmsrc/src/Server(1700): pocketmine\Server->tick()

7 pmsrc/src/Server(1076): pocketmine\Server->tickProcessor()

8 pmsrc/src/PocketMine(334): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[50] C:\Users\Administrator\Documents\MV - RL\5.Arcade\, string[58] C:\Users\Administrator\Documents\MV - RL\5.Arcade\plugins)

9 pmsrc/src/PocketMine(357): pocketmine\server()

10 pmsrc(11): require(string[94] phar://C:/Users/Administrator/Documents/MV - RL/5.Arcade/PocketMine-MP.phar/src/)

jarne commented 1 year ago

I cannot reproduce this problem. Can you please provide the following additional information:

UnknownNull commented 1 year ago

1- 5.4.3 2- config:

#  _   _       _   ____  _            _
# | | | | ___ | |_| __ )| | ___   ___| | __
# | |_| |/ _ \| __|  _ \| |/ _ \ / __| |/ /
# |  _  | (_) | |_| |_) | | (_) | (__|   <
# |_| |_|\___/ \__|____/|_|\___/ \___|_|\_\
#
# (C) 2018 by surva network | https://github.com/survanetwork

# Language of the plugin messages
# Possible options are: en (English), de (German), fr (French), tr (Turkish), id (Indonesian)
language: "en"

# Name of the world where the game is in
world: "hotblock"

# Area restriction, only enable the game between these two coordinate positions (uncomment to enable)
# If not uncommented, the whole world specified above will be used
# area:
  # pos1:
  #   x: -50
  #   y: 50
  #   z: -50
  # pos2:
  #   x: 50
  #   y: 100
  #   z: 50

# How many players must be online that the block is active (prevent that one player is getting coins alone)
players: 3

# The interval in which should be checked on which block the players are standing (and send messages, give effects, etc.) (in seconds)
checkspeed: 0.25

# The interval in which coins should be given to the player(s) standing on the HotBlock (in seconds)
coinspeed: 0.25

# Only give coins when a player is alone on the HotBlock
onlyplayer: false

# Which effect a player gets when he touches a nether-block
#
# Possible values are:
#  SPEED
#  SLOWNESS
#  HASTE
#  FATIGUE
#  STRENGTH
#  INSTANT_HEALTH
#  INSTANT_DAMAGE
#  JUMP_BOOST
#  NAUSEA
#  REGENERATION
#  RESISTANCE
#  FIRE_RESISTANCE
#  WATER_BREATHING
#  INVISIBILITY
#  BLINDNESS
#  NIGHT_VISION
#  HUNGER
#  WEAKNESS
#  POISON
#  WITHER
#  HEALTH_BOOST
#  ABSORPTION
#  SATURATION
#  LEVITATION
#  FATAL_POISON
#
effecttype: "POISON"

# How long the effect should take (in seconds)
effectduration: 3

3- yes

jarne commented 1 year ago

Please also add the plugin version you're using.

UnknownNull commented 1 year ago

1.2.3

jarne commented 1 year ago

Could you please provide the full crashlog file created in the crashdumps directory? I have the suspicion that it's related to the way how file paths work on Windows, but I'm still investigating.

jarne commented 1 year ago

Fixed with #52, thanks for reporting! This bug was only appearing when running the plugin from source on Windows. Anyways, I'd recommend running it from an official release PHAR file from the release page or Poggit.