Solved Integrating support for a plugin without needing it to be on the server

Discussion in 'Spigot Plugin Development' started by KingDragonRider, Apr 18, 2017.

  1. Hi All,

    For our network, I am making a plugin that is added on each of the Spigot servers to handle server-side swearword filtering (We made another bungee plugin to handle the network side), and in doing so it messes up the chat formatting on the factions server. I have altered the code to fix this, but as it required me to have Factions as a referenced library, it now won't enable on other servers with this error:
    Code (Text):
    Error occurred while enabling FCMain v0.2 (Is it up to date?)
    java.lang.NoClassDefFoundError: com/massivecraft/factions/RelationParticipator
    (Note: I am only interacting with the the Factions/MassiveCore plugins if they are enabled. I am also only storing them as Plugin objects - not Factions or MassiveCore - until I am sure that they are enabled, at which point I cast them to their appropriate plugin class)

    So I ask, is there anything I have to do to allow support for a plugin, without requiring the plugin to be on the server?

    Thanks :)
  2. Alright so, you need to check if the Factions plugin is present on the server, if it's not, enable one Chat listener, if it is, enable the Factions chat listener.
    • Like Like x 1
  3. I didn't think of that - thanks. I will try that.
    • Like Like x 1
  4. Brilliant, it works perfectly. Thanks a bunch :)
  5. Mark thread as solved and have a great day.