TNT-Fill | How It Works

Mar 22, 2016
TNT-Fill | How It Works
  • TNT-Fill has a fair simple process for filling or clearing dispensers, most of which don't hurt server performance and prevent duplicate glitches that are possible with other plugins. The simple process (outlined, not exact) can be found below, if you want further information feel free to private message me (LeePMC).

    The first step with any command is when it is typed. for this example i am going to explain the process of /tntfill 5 8.

    It all starts out with validation, validating that the player is not console, validating the amount of TNT the player has, and even validating the radius for max radius etc

    once all the validation is done for all data required a method is called appropriate to the players game mode and command typed that returns a FillResult, but we will get to that soon

    the method... first starts off checking each unique stack of TNT in the players inventory (and if they have enough TNT) and adds them to a virtual storage system that can't be altered by any third party plugin.

    Then comes the dispensers, finding the dispensers is the easy and lag free part, next comes the quick check for factions (this is skipped if you don't have the factions plugin), the real part is the calculations required to avoid client crashes and to avoid TNT duplication, not only does the plugin fill the dispenser but also checks, validates and double checks the TNT inside the dispenser for matches against the TNT in the player inventory to help use the full potential of the dispenser.

    once all dispensers have been filled and validated the next part is returning the result. the plugin will give feedback to how the fill resulted. There are about 8 results for maximum customisation with messages. Which is then used in the next step.

    The final step would then be reporting the outcome to the player (based not he fill result) and this is done through the fully customisable language file :D

    and that is how the plugin works (the explanation), for those that still think this plugin will affect performance this plugin runs fine on servers with 2000+ players, and is aimed at reducing lag, from the first original post the efficiency of this plugin has increased by over 700% (NOT LYING) and is still being improved every day.
  • Loading...
  • Loading...