game-mode flag and multiverse gamemode issue (I know this has been posted before)
LadyCailinBot opened this issue ยท 14 comments
WORLDGUARD-3933 - Reported by ShawnPR1
Hi there. I know this has been posted a few times and that the end result is that Multiverse has a slight delay when changing the gamemode compared to Worldguard and that is why the game-mode flag seems to not work when players enter a region from a different world.
I just want to know if there is any way to still manage to make this work in a fluent manner. For example the Multiverse gamemode is set to survival, but the region is set to adventure. Basically a shop or something similar players can teleport to from a different world.
I have found the following works:
I created a small region inside the region I want them to be in adventure mode that changes their gamemode to survival. I then surrounded this tiny 2 block region with the one I intend to change their gamemode to adventure with. This worked well, but the players were in survival mode when they stood in that area and that's kinda annoying.
I also would like to know if it won't be possible to just use the player-move event to change the game-mode as well?
This issue has been posted a few times here, but nobody has a solution for it at all. I don't want to talk about how the busy devs should fix this seeing as they are very busy and haven't updated this plugin in a while anyway, I would more like to know possible solutions that are efficient, yet professional (unlike the tiny survival mode region mentioned above)
Thanks for this plugin btw. Without it most servers would be in complete disarray.
Comment by PseudoKnight
You can give players mv.bypass.gamemode.* and let WG handle gamemodes. Two plugins doing the same job creates conflicts.
Comment by ShawnPR1
@PseudoKnight that is a horrible idea (at least for my server). If I do that, then they can keep their creative gamemode in the survival world (if they switch from the creative world to the survival).
Thanks for the suggestion, but that will not work (I already tested it btw as I did see someone suggest that as well in some other threads)
Comment by PseudoKnight
You'd need to set the gamemode flag for every world's global region, just like you did for Multiverse. You should use one or the other to manage gamemodes, not both.
Comment by PseudoKnight
MV delays a tick before setting gamemodes, so compatibility is not as simple as an event priority issue.
WG could attempt to cancel gamemode changes by listening to PlayerGameModeChangeEvent, but I looked and it's already doing that here.
Note that it excludes those with region bypass. Keep that in mind when testing.
Comment by PseudoKnight
In fact, it might be working fine for you, you just didn't realize it wouldn't apply to region bypass players. This allows admins to change their gamemode independently of the region flag, but there's no way for WG to differentiate between an admin changing their gamemode with a command or automatically via a plugin like MV. So all are allowed.
Comment by ShawnPR1
You stated I need to use only one of these plugins to manage the gamemode. The problem is I want the player's gamemode to be different than the Multiverse gamemode for one area. Setting the global gamemode might work perfectly, problem is that when the player teleports into that region from a different world the gamemode change does not get set by worldguard, but by multiverse. If they have access to bypass the multiverse gamemode then they can get creative in the survival world.
It would've been very helpful if worldguard could just use the player-move event to change their gamemode in a region.
I've even realised another problem with worldguard and this whole problem of a player teleporting into a region from a different world. This problem is the greeting flag. If they enter a region from a different world, the greeting message does not get sent. Which is quite frustrating. Clearly something is wrong in terms of teleporting into a region from a different world and is not handled perfectly.
Thanks for your responses though
Comment by PseudoKnight
"The problem is I want the player's gamemode to be different than the Multiverse gamemode for one area."
Which is exactly why I said to use WorldGuard only. I feel like you're not understanding me.
"It would've been very helpful if worldguard could just use the player-move event to change their gamemode in a region."
It does. It uses player movement (if enabled), vehicle movement, teleporting (if enabled), and even entering a vehicle.
Comment by ShawnPR1
I'll experiment a bit more then and try to understand your above statements better.
WorldGuard does NOT use the player move event to change the player's gamemode for a specific region. If it did, I would not have posted this in the first place. I have it enabled in the config file. Both the player move and teleport event.
Thanks for your responses I'm sure I'll be able to manage it now. I do apologize for not clearly understanding your statements. Been occupying myself with other stuff.
I still have an issue with the greeting flag, however, seeing as it does not get sent to the player if they teleport from a different world into a region with the greeting flag set. Might create a new issue for that
Comment by ShawnPR1
Alright few seconds in and thanks to you it's working perfectly.
Members have the mv.bypass.gamemode. permission for the world that I want to enforce adventure in one region, but the rest of the world should be survival. __global__ region's gamemode flag is set to survival and the region I want them to be in adventure's gamemode flag is set to adventure.
Will create a new issue regarding the greeting flag if it has not yet been posted by somebody else
Comment by PseudoKnight
"WorldGuard does NOT use the player move event to change the player's gamemode for a specific region."
That is very odd. Player movement is the primary listener for many session flags, like "entry".
Comment by ShawnPR1
I know. It does work normally when entering the region while in the world (example walking out of the region and back in or teleporting into that region from the same world).
But when teleporting into the region from a different world, it does not work at all. I truly hope that I'm not the only one with the issue. If I am it's simply conflicting plugins, but I doubt that could be possible.
Comment by PseudoKnight
Oh, that's just Multiverse conflicting. And that's a teleport event, so I'm not sure why you said "move event".
Comment by ShawnPR1
Well I said move event because I still feel the greeting should show as soon as the player starts moving in the region. I assume that's how it works, actively checking if a player is moving inside a region or something.
Comment by PseudoKnight
Greetings occur when the player moves/teleports/rides and there's a differing greeting for the new location from the last location. This is sometimes useful because you can apply the greeting to multiple adjacent regions to avoid having the greeting spam the player.