HELP! Need to call an event during entering a command.

Discussion in 'Plugin Development' started by Minermax7, Dec 2, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    Hey guys,
    I am working on a plugin that uses the onPlayerJoin event, and I am unsure of how to call that event using a command, for example, instead of rewriting that code to fit the command, I want to just link the code in the event to the command. So that code is run when the command is run, it would greatly cut down my amount of code and make it easier to navigate.
  2. Create a new void, then put your code inside. Call that void both when the command is entered and when the event occurs.
  3. Offline


    adventuretc Yep. Although it's not called 'a void'. It's called a method whose return type is void i.e nothing.
Thread Status:
Not open for further replies.

Share This Page