Skip to content

Conversation

@MS-crew
Copy link

@MS-crew MS-crew commented Jun 13, 2025

Description

Describe the changes
Added RoomChanged and ZoneChanged events triggered when a player changes rooms or zones.

What is the current behavior? (You can also link to an open issue here)
The Exiled does not provide built-in events for tracking room/zone changes.
Plugins must manually track player Rooms or Zones to detect these changes.

What is the new behavior? (if this is a feature change)
Plugins can now subscribe to:

Player.RoomChanged: Fires when a player enters a new RoomIdentifier.
Player.ZoneChanged: Fires when a player enters a new ZoneType.
Both events include Player and old room , new room or old zone new zone data(zones just for changed zone event ) .

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
❌ No. This is a non-breaking change that adds new features without modifying existing behavior.

Other information:


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

@louis1706
Copy link

louis1706 commented Jun 19, 2025

I am not sure than ZoneChanged is actually needed since RoomChanged will be call anyways and a simple check would do the work

@MS-crew
Copy link
Author

MS-crew commented Jun 19, 2025

I am not sure than ZoneChanged is actually needed since RoomChanged will be call anyways and a simple check would do the work

@louis1706 hmm yes, I'm undecided about this, I leave the choice to you, if you want, you can delete the zone changed event, or I can delete it, just say

@louis1706
Copy link

I am not sure than ZoneChanged is actually needed since RoomChanged will be call anyways and a simple check would do the work

@louis1706 hmm yes, I'm undecided about this, I leave the choice to you, if you want, you can delete the zone changed event, or I can delete it, just say

Yeah in my opinion unneeded event need to be removed it's reduced useless complexity inside transpiller

@MS-crew MS-crew changed the title feat: New Player Changed Room & Changed Zone events feat: New Player Changed Room events Jun 19, 2025
@MS-crew MS-crew requested a review from louis1706 June 19, 2025 12:00
@MS-crew
Copy link
Author

MS-crew commented Jun 19, 2025

@louis1706 Deleted Zone Changed Event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants