code: public void registerListener(IPluginEvent listener) {
          if (pluginEventListeners1 == null) {
              pluginEventListeners1 = new ArrayList<>();
          }
  
          if (!pluginEventListeners1.contains(listener)) {
              pluginEventListeners1.add(listener);
          }
      }
docs: Registers a listener for the IPluginEvent callback event. If the listener has already been
  registered, the request is ignored.
  
  @param listener Listener to be registered.