mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
misc cleanup
This commit is contained in:
1 parent
1403955028
commit
6add891319
16 files changed
+99
-181
No files matched your search
@@ -47,9 +47,4 @@ public class VelocityUserManager extends PlatformUserManager<CarbonPlayerVelocit
|
||||
return new CarbonPlayerVelocity(this.proxyServer, common);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateTransientLoadedStatus(final CarbonPlayerVelocity wrapped) {
|
||||
wrapped.carbonPlayerCommon().markTransientLoaded(wrapped.player().isEmpty());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,10 +21,8 @@ package net.draycia.carbon.velocity.users;
|
||||
|
||||
import com.velocitypowered.api.proxy.Player;
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Optional;
|
||||
import net.draycia.carbon.api.channels.ChatChannel;
|
||||
import net.draycia.carbon.api.users.CarbonPlayer;
|
||||
import net.draycia.carbon.api.util.InventorySlot;
|
||||
import net.draycia.carbon.common.users.CarbonPlayerCommon;
|
||||
@@ -32,7 +30,6 @@ import net.draycia.carbon.common.users.WrappedCarbonPlayer;
|
||||
import net.draycia.carbon.common.util.EmptyAudienceWithPointers;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.audience.ForwardingAudience;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
@@ -43,11 +40,10 @@ import org.jetbrains.annotations.NotNull;
|
||||
public final class CarbonPlayerVelocity extends WrappedCarbonPlayer implements ForwardingAudience.Single {
|
||||
|
||||
private final ProxyServer server;
|
||||
private final CarbonPlayerCommon carbonPlayerCommon;
|
||||
|
||||
public CarbonPlayerVelocity(final ProxyServer server, final CarbonPlayerCommon carbonPlayerCommon) {
|
||||
super(carbonPlayerCommon);
|
||||
this.server = server;
|
||||
this.carbonPlayerCommon = carbonPlayerCommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,30 +57,10 @@ public final class CarbonPlayerVelocity extends WrappedCarbonPlayer implements F
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Key> leftChannels() {
|
||||
return this.carbonPlayerCommon.leftChannels();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void joinChannel(final ChatChannel channel) {
|
||||
this.carbonPlayerCommon.joinChannel(channel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void leaveChannel(final ChatChannel channel) {
|
||||
this.carbonPlayerCommon.leaveChannel(channel);
|
||||
}
|
||||
|
||||
public Optional<Player> player() {
|
||||
return this.server.getPlayer(this.uuid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public CarbonPlayerCommon carbonPlayerCommon() {
|
||||
return this.carbonPlayerCommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable Locale locale() {
|
||||
return this.player().map(value -> value.getPlayerSettings().getLocale()).orElse(null);
|
||||
|
||||
Reference in new issue
Block a user