1.14.4 Looping trought Chunks and save Data

Discussion in 'Spigot Plugin Development' started by KleeSup, Mar 14, 2020.

  1. Hey Guys!

    Im currently working on a Faction Server. My Players had the wish that Im adding an F-TOP. So basically my Code is: Looping all Factions (opens and closes yml file for each Faction) > looping trought all Claims of all Factions (opens and closes yml File for each Chunk) > loop throught all Blocks in Chunk > check if spawner (if so > add 10k money value) > calculate F-TOP with 10 Factions at the Top. The Problem is not that its not working (because it does). The Problem is the Performance. My Server is literally absolutly lagging with just 10 Factions. A-Sync Task doesn't work because of Bukkit. Any ideas to fix that?

    Have a good day!

    PS: Sorry for bad English :p
  2. store the number of spawners for each faction ie when a spawner is placed in a claim increment the number, when a spawner is broken in a claim decrement it
    • Agree Agree x 1