mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Remove temporary nickname feature
This commit is contained in:
8 files changed
+12
-245
No files matched your search
@@ -67,10 +67,6 @@ public final class CarbonPlayerBukkit extends WrappedCarbonPlayer implements For
|
||||
public void displayName(final @Nullable Component displayName) {
|
||||
this.carbonPlayerCommon.displayName(displayName);
|
||||
|
||||
if (this.hasActiveTemporaryDisplayName()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.player().ifPresent(player -> {
|
||||
// Update player's name in chat
|
||||
player.displayName(displayName);
|
||||
@@ -80,21 +76,6 @@ public final class CarbonPlayerBukkit extends WrappedCarbonPlayer implements For
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void temporaryDisplayName(final @Nullable Component displayName, final long expirationEpoch) {
|
||||
this.carbonPlayerCommon.temporaryDisplayName(displayName, expirationEpoch);
|
||||
|
||||
this.player().ifPresent(player -> {
|
||||
// Update player's name in chat
|
||||
player.displayName(displayName);
|
||||
|
||||
// Update player's name in the tab player list
|
||||
player.playerListName(displayName);
|
||||
|
||||
// TODO: schedule task to unset temporary display name when it expires
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Component createItemHoverComponent(final InventorySlot slot) {
|
||||
final Optional<Player> player = this.player(); // This is temporary (it's not)
|
||||
|
||||
Reference in new issue
Block a user