Update ParticleInventory
Dieser Commit ist enthalten in:
Ursprung
a1b386196d
Commit
d2c6d4d766
@ -20,6 +20,7 @@
|
||||
package de.steamwar.lobby.inventories;
|
||||
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.inventory.SWListInv;
|
||||
import de.steamwar.lobby.particle.*;
|
||||
import de.steamwar.lobby.utils.LobbyPlayer;
|
||||
@ -137,17 +138,25 @@ public class ParticleInventory {
|
||||
particleList = new ArrayList<>(SERVERTEAM_PARTICLES_ENTRIES);
|
||||
}
|
||||
|
||||
if (steamwarUser.getTeam() != 0 && !userGroup.isTeamGroup()) {
|
||||
for (EventParticle eventParticle : EventParticle.eventParticles) {
|
||||
if (contains(eventParticle.placementTeams, steamwarUser.getTeam())) {
|
||||
boolean clickablePlacement = userGroup.isTeamGroup();
|
||||
clickablePlacement |= (steamwarUser.getTeam() != 0 && contains(eventParticle.placementTeams, steamwarUser.getTeam()));
|
||||
if (clickablePlacement) {
|
||||
particleList.add(new SWListInv.SWListEntry<>(eventParticle.placementParticle.getItem(), eventParticle.placementParticle));
|
||||
} else {
|
||||
SWItem swItem = eventParticle.placementParticle.getItem();
|
||||
swItem.setName(swItem.getItemMeta().getDisplayName() + " §8- §c§lGesperrt");
|
||||
particleList.add(new SWListInv.SWListEntry<>(swItem, null));
|
||||
}
|
||||
}
|
||||
|
||||
boolean clickableParticipation = userGroup.isTeamGroup();
|
||||
// TODO: Team team = Team.get(steamwarUser.getTeam()); participation fehlt!, wofür 'TeamTeilnahme' im SpigotCore fehlt.
|
||||
} else if (userGroup.isTeamGroup()) {
|
||||
for (EventParticle eventParticle : EventParticle.eventParticles) {
|
||||
particleList.add(new SWListInv.SWListEntry<>(eventParticle.placementParticle.getItem(), eventParticle.placementParticle));
|
||||
if (clickableParticipation) {
|
||||
particleList.add(new SWListInv.SWListEntry<>(eventParticle.participationParticles.getItem(), eventParticle.participationParticles));
|
||||
} else {
|
||||
SWItem swItem = eventParticle.participationParticles.getItem();
|
||||
swItem.setName(swItem.getItemMeta().getDisplayName() + " §8- §c§lGesperrt");
|
||||
particleList.add(new SWListInv.SWListEntry<>(swItem, null));
|
||||
}
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren