mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-02-11 11:40:21 +00:00
Fix GUI not opening
Fix a bug preventing the GUI from opening when a user doesn't have any styles.
This commit is contained in:
parent
e47da74d22
commit
ee4b1e5e54
1 changed files with 3 additions and 1 deletions
|
@ -325,7 +325,9 @@ public class PlayerParticlesGui extends BukkitRunnable implements Listener {
|
||||||
public static void changeState(PPlayer p, GuiState state) {
|
public static void changeState(PPlayer p, GuiState state) {
|
||||||
Player player = p.getPlayer();
|
Player player = p.getPlayer();
|
||||||
|
|
||||||
if (PermissionManager.getEffectsUserHasPermissionFor(player).size() == 1 || PermissionManager.getStylesUserHasPermissionFor(player).size() == 1 || (state == GuiState.DATA && p.getParticleSpawnData() == null && p.getParticleSpawnColor() == null)) return;
|
if ((state == GuiState.EFFECT && PermissionManager.getEffectsUserHasPermissionFor(player).size() == 1) ||
|
||||||
|
(state == GuiState.STYLE && PermissionManager.getStylesUserHasPermissionFor(player).size() == 1) ||
|
||||||
|
(state == GuiState.DATA && p.getParticleSpawnData() == null && p.getParticleSpawnColor() == null)) return;
|
||||||
|
|
||||||
// Update the state and create an inventory for the player if one isn't already open for them
|
// Update the state and create an inventory for the player if one isn't already open for them
|
||||||
// If they have the wrong inventory open for some reason, create a new one and open it for them
|
// If they have the wrong inventory open for some reason, create a new one and open it for them
|
||||||
|
|
Loading…
Reference in a new issue