mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2024-12-31 20:02:12 +00:00
Fix build error
This commit is contained in:
parent
92439c417e
commit
f997676ee7
3 changed files with 33 additions and 3 deletions
|
@ -13,7 +13,6 @@ import dev.esophose.playerparticles.styles.ParticleStyle;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
@ -22,6 +21,13 @@ import org.bukkit.entity.Player;
|
|||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* The API for the PlayerParticles plugin.
|
||||
* Used to manipulate a player's particles and data.
|
||||
*
|
||||
* Note: This API will bypass all permissions and does not send any messages.
|
||||
* Any changes made through the API will be saved to the database automatically.
|
||||
*/
|
||||
public final class PlayerParticlesAPI {
|
||||
|
||||
private static PlayerParticlesAPI INSTANCE;
|
||||
|
@ -173,6 +179,7 @@ public final class PlayerParticlesAPI {
|
|||
dataManager.saveParticleGroup(pplayer.getUniqueId(), pplayer.getActiveParticleGroup());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<ParticlePair> getActivePlayerParticles(@NotNull Player player) {
|
||||
PPlayer pplayer = this.getPPlayer(player);
|
||||
if (pplayer == null)
|
||||
|
@ -181,6 +188,15 @@ public final class PlayerParticlesAPI {
|
|||
return pplayer.getActiveParticles();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ParticlePair getActivePlayerParticle(@NotNull Player player, int id) {
|
||||
PPlayer pplayer = this.getPPlayer(player);
|
||||
if (pplayer == null)
|
||||
return null;
|
||||
|
||||
return pplayer.getActiveParticle(id);
|
||||
}
|
||||
|
||||
private ParticleGroup validateActivePlayerParticle(Player player, int id) {
|
||||
PPlayer pplayer = this.getPPlayer(player);
|
||||
if (pplayer == null)
|
||||
|
@ -236,6 +252,7 @@ public final class PlayerParticlesAPI {
|
|||
this.removePlayerParticleGroup(player, particleGroup.getName());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<ParticleGroup> getPlayerParticleGroups(@NotNull Player player) {
|
||||
PPlayer pplayer = this.getPPlayer(player);
|
||||
if (pplayer == null)
|
||||
|
@ -245,6 +262,13 @@ public final class PlayerParticlesAPI {
|
|||
}
|
||||
//endregion
|
||||
|
||||
//region Fixed Effect Management
|
||||
// TODO - Create fixed effect
|
||||
// TODO - Edit fixed effect
|
||||
// TODO - Remove fixed effect
|
||||
// TODO - Get fixed effect(s)
|
||||
//endregion
|
||||
|
||||
//region GUI Management
|
||||
public void openParticlesGui(@NotNull Player player) {
|
||||
PPlayer pplayer = this.getPPlayer(player);
|
||||
|
@ -267,4 +291,10 @@ public final class PlayerParticlesAPI {
|
|||
}
|
||||
//endregion
|
||||
|
||||
//region Registering Custom Styles
|
||||
// TODO: Register custom styles
|
||||
// TODO: Register custom handled styles
|
||||
// TODO Note: This is currently accessible through ParticleStyleManager
|
||||
//endregion
|
||||
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ public class GroupCommandModule implements CommandModule {
|
|||
}
|
||||
|
||||
// Delete the group and notify player
|
||||
PlayerParticles.getInstance().getManager(DataManager.class).removeParticleGroup(pplayer.getUniqueId(), group);
|
||||
PlayerParticles.getInstance().getManager(DataManager.class).removeParticleGroup(pplayer.getUniqueId(), group.getName());
|
||||
localeManager.sendMessage(pplayer, "group-remove-success", StringPlaceholders.single("name", groupName));
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public class GuiInventoryManageGroups extends GuiInventory {
|
|||
lore,
|
||||
(button, isShiftClick) -> {
|
||||
if (isShiftClick) {
|
||||
dataManager.removeParticleGroup(pplayer.getUniqueId(), group);
|
||||
dataManager.removeParticleGroup(pplayer.getUniqueId(), group.getName());
|
||||
|
||||
this.actionButtons.remove(button);
|
||||
this.inventory.setItem(button.getSlot(), null);
|
||||
|
|
Loading…
Reference in a new issue