I have a plugin that executes some stuff on transfer, but I don't want it to happen when the transfer occurs across the same map.
Or, you can do what I showed you to store the map ID into a variable before the transfer event and put the stuff you execute via plugin into a conditional with that.
Or you can make a plugin to modify the transfer code to set a variable or switch any time the transfer is within the same map.
Really, there are many ways to implement it, but all of them are sufficiently complex for their own thread.