yapzhenyie / GadgetsMenu

Feature-rich cosmetics plugin that provide players with the most powerful features.
http://bit.ly/GadgetsMenu
65 stars 24 forks source link

GadgetsMenuAPI - Usage prevent from using Suits [SOLVED] #953

Closed Ducki0210 closed 1 year ago

Ducki0210 commented 1 year ago

Describe the bug I recently used the API in order to automatically equip the SpooderMan suit when a player joins the server but it seems that using the API to such purpose does everything right except from using the ability of the suit.

So I only tried with the suit I just mentioned before, the cobwebs are thrown well and yet they only bounce against the wall they hurt without even moving the player.

To Reproduce Steps to reproduce the behavior:

  1. Use this code to make it works in your PlayerJoinEvent : PlayerManager playerManager = GadgetsMenuAPI.getPlayerManager(player); if (playerManager != null) playerManager.equipSuit(SuitType.SPOODERMAN);
  2. Just connect and try to use the suit

Expected behavior A normal suit ability behaviour

Further Information (please complete the following information):

Screenshots https://youtu.be/SAnTbpE_cxQ

Additional Information Hope you can solve it ASAP :)

yapzhenyie commented 1 year ago

Hi, may I know do the player has the permission to access spooderman suit?

Ducki0210 commented 1 year ago

As the owner of the server, I have every single permission but just in case, I also gave myself the permission and it does not change anything

Ducki0210 commented 1 year ago

Ohh I think I just figured it out, I tried the same code in a command and it does work so it would be a problem only related to the PlayerJoinEvent as something from the API must not have been initialized already

Ducki0210 commented 1 year ago

I delayed it from 1 tick and it works, sorry to have bothered and thank you for your attention ^^

yapzhenyie commented 1 year ago

You can try use a delay thread when equip the cosmetics. As GadgetsMenu will sync cosmetics when player join, it can have conflict when both plugin is calling the equip cosmetic method.