2626
2727import org .spongepowered .api .Sponge ;
2828import org .spongepowered .api .entity .Entity ;
29+ import org .spongepowered .api .entity .living .player .tab .TabListEntry ;
2930
3031/**
3132 * Represents the state of an {@link Entity}'s vanish state.
@@ -216,6 +217,26 @@ static VanishState unvanished() {
216217 */
217218 VanishState triggerVibrations (boolean triggerVibrations );
218219
220+ /***
221+ * Gets if the {@link Entity}'s associated {@link TabListEntry}
222+ * should be hidden while invisible.
223+ *
224+ * @return Whatever the associated {@link TabListEntry}
225+ * should be hidden while invisible
226+ */
227+ boolean hidesTabListEntry ();
228+
229+ /**
230+ * If {@link #invisible()} returns true, this will return the
231+ * {@link VanishState} with the desired flag replacing
232+ * {@link #hidesTabListEntry()}.
233+ *
234+ * @param hideTabListEntry Whatever the associated {@link TabListEntry}
235+ * is hidden while invisible
236+ * @return The new VanishState
237+ */
238+ VanishState hideTabListEntry (boolean hideTabListEntry );
239+
219240 interface Factory {
220241
221242 /**
@@ -228,6 +249,7 @@ interface Factory {
228249 * <li>{@link VanishState#createsSounds()} = {@code false}</li>
229250 * <li>{@link VanishState#createsParticles()} = {@code false}</li>
230251 * <li>{@link VanishState#triggerVibrations()} = {@code false}</li>
252+ * <li>{@link VanishState#hidesTabListEntry()} = {@code true}</li>
231253 * </ul>
232254 *
233255 * @return A newly created invisible {@link VanishState}
@@ -243,6 +265,7 @@ interface Factory {
243265 * <li>{@link VanishState#createsSounds()} = {@code true}</li>
244266 * <li>{@link VanishState#createsParticles()} = {@code true}</li>
245267 * <li>{@link VanishState#triggerVibrations()} = {@code false}</li>
268+ * <li>{@link VanishState#hidesTabListEntry()} = {@code false}</li>
246269 * </ul>
247270 *
248271 * @return A newly created visible {@link VanishState}
0 commit comments