Solved how do i get a CommandSender in another class?

Discussion in 'Spigot Plugin Development' started by guid118, Jul 12, 2021.

  1. so, im working on this plugin, that among other things, summons fireworks.

    the command i'm currently working on is "fireworks" with an argument (rn either "wall" or "ultimate") which will summon certain fireworks. now to keep a clear view of what is where (there is alot of fireworks being summoned). i'd want the commands regarding the "ultimate" argument in the ultimate class, but when using Bukkit.dispatchComand, i need a CommandSender and I currently don't know how to get a sender from one class to another.
    (also, here is all of my code: https://github.com/guid118/GuardianBeamRewrite it is all in the CommandFireworks and ultimate files)
     
  2. just pass it as an argument
    ultimate.fireworksultimate(sender);
     
    • Like Like x 1
  3. worked, thanks!