DRE2N / DungeonsXL

Create custom dungeons and adventure maps with ease!
https://www.spigotmc.org/resources/dungeonsxl.9488/
GNU General Public License v3.0
152 stars 84 forks source link

PlayCommand.java didn't use GroupAdapter, should it? #1113

Open RadND opened 1 year ago

RadND commented 1 year ago

I want to let players use Multverse-Portal(https://github.com/Multiverse/Multiverse-Portals) 's Portal to enter DXL 's Dungeon So I write some code , it listen portal event and check some player condition -> if true -> /dxl play

that's fine,at least if that's not fine it's not dxl to blame,but then I plan to use my own Group plugin (to make every player have a group by default because dungeons I made usually can be played single-player), and DungeonsAPI do not provide getGroupAdapter() so what will happen is only player who enter the portal is teleported to dungeon , and in dxl 's perspective this player is playing dungeon alone

Should /dxl play use groupadapter? Is it the only way to solve my problem?

Sataniel98 commented 1 year ago

Hi, sorry for the late reply. /dxl play starts a game with the group the player's in or creates one if he isn't in one. You by design can't use it to gather players in one instance. Set the group with all players up before entering the dungeon. Then make the players enter.

And yes, there is currently no API method to easily initialize a dungeon and game. This is because because of some quirks of the internals, and it will be rewritten in DXL 0.19. If you're still interested in doing this, you can have a look at the code in DPortal and PlayCommand.

RadND commented 1 year ago

So currently , as 3rd party developer (me) , there is no way to "Create DXL Group based on Vendor Group" , right? If this is true ,currently when using a vendor group plugin , only way to really use it ( player's vendor group ) is ask player to interact with the [Group] sign , because according to my code search result, only GroupSign.java#L167 use GroupAdapter.