Skip to content

[GuildApi] Delete confirmed message if GuildCreateEvent is canceled #267

Open

Description

@Flashback083

Description

Using GuildCreateEvent, cancel it with the api will send a "Action confirmed" message

Expected Behavior

Remove the action confirmed message if the event is cancelled

Actual Behavior

The event is cancelled correctly but players get a green message
https://i.imgur.com/9z2Xb8f.png sorry message is in FR

Possible Fix

https://github.com/guilds-plugin/Guilds/blob/master/src/main/java/me/glaremasters/guilds/commands/actions/CommandConfirm.java
Im not sure if its here but maybe its possible to not print the SUCESS if canceled ?

Steps to Reproduce

  1. Make a plugin with GuildCreateEvent
  2. Cancel the event
  3. Try creating guild in game
  4. See the action confirmed

Context

I want to deny create of guild if there have same name
Actually, the Guild plugin will not take § like same name so a guild can have §aHello and another one §bHello so i make a plugin do check name and prefix if equals (prefix is something i make for my server, so its not something i ask for in guild plugin directly)

Your Environment

  • Guilds version : 3.5.3.7
  • MC Version : 1.12.2

Thanks for reading !
PS : Maybe its needed for every event that have a /confirm command ?

Activity

  1. darbyjack commented on Nov 27, 2019

    @darbyjack
    Member

    If I understand this correctly, cancelling a CreateEvent with the API causes it to send a message as if the user confirmed it?

  2. Flashback083 commented on Nov 27, 2019

    @Flashback083
    Author

    If not canceled the player will have : "Action confirmed" and the message for the guild creation like "Your guild has been created" !
    If canceled the player will just have "Action confirmed" but its can be confusing for the player if he see this :p

  3. darbyjack commented on Nov 27, 2019

    @darbyjack
    Member

    Ahh, I see what you are saying. I think I know a way to handle this. So currently the messages are tied to the confirm / deny commands. I can just move the messages from those to the individual commands where events are taking place and then just send the message at the end.

  4. darbyjack commented on Dec 26, 2019

    @darbyjack
    Member

    Sorry for the delay on this. I also totally forgot about it. I'm releasing an update soon and it sadly won't be in it (totally my fault for forgetting). If you want it quicker, you could just PR it for me. It's kind of a mess since I need to assess where all the issues might be.

  5. Flashback083 commented on Dec 27, 2019

    @Flashback083
    Author

    No worries about that, but if i understand, i should remove CommandConfirm.java and put the message in (For guild creation for example) to CommandCreate.java after if the event is canceled ?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions