Is it possible to activate or deactivate a listener in the code using a command?
Example: if I enter / activate teleporter, a PlayerJoinEvent should be activated which keeps the player in the inventory with a teleporter item when joining.
if it is deactivated nothing should happen.
Is that possible or is there even another possibility to achieve the same goal?
Hi
I would create a Boolean which is activated at '/ teleporter'.
Then you only have to query in the event whether the Boolean is true.
Thats right