refactor(appearance): remove old code
This commit is contained in:
parent
1ce7fbe3f0
commit
76c8f734e7
1 changed files with 1 additions and 20 deletions
|
@ -2,12 +2,11 @@ package xyz.ineanto.nicko.appearance;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
|
||||||
import xyz.ineanto.nicko.Nicko;
|
import xyz.ineanto.nicko.Nicko;
|
||||||
import xyz.ineanto.nicko.event.custom.PlayerDisguiseEvent;
|
import xyz.ineanto.nicko.event.custom.PlayerDisguiseEvent;
|
||||||
import xyz.ineanto.nicko.event.custom.PlayerResetDisguiseEvent;
|
import xyz.ineanto.nicko.event.custom.PlayerResetDisguiseEvent;
|
||||||
import xyz.ineanto.nicko.packet.PaperPacketSender;
|
|
||||||
import xyz.ineanto.nicko.packet.PacketSender;
|
import xyz.ineanto.nicko.packet.PacketSender;
|
||||||
|
import xyz.ineanto.nicko.packet.PaperPacketSender;
|
||||||
import xyz.ineanto.nicko.profile.NickoProfile;
|
import xyz.ineanto.nicko.profile.NickoProfile;
|
||||||
import xyz.ineanto.nicko.storage.PlayerDataStore;
|
import xyz.ineanto.nicko.storage.PlayerDataStore;
|
||||||
import xyz.ineanto.nicko.storage.name.PlayerNameStore;
|
import xyz.ineanto.nicko.storage.name.PlayerNameStore;
|
||||||
|
@ -67,27 +66,9 @@ public class AppearanceManager {
|
||||||
|
|
||||||
packetSender.sendEntityMetadataUpdate();
|
packetSender.sendEntityMetadataUpdate();
|
||||||
packetSender.sendTabListUpdate(displayName);
|
packetSender.sendTabListUpdate(displayName);
|
||||||
//respawnPlayer();
|
|
||||||
//packetSender.sendEntityRespawn();
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void respawnPlayer() {
|
|
||||||
final boolean wasFlying = player.isFlying();
|
|
||||||
final boolean wasAllowedToFly = player.getAllowFlight();
|
|
||||||
final int foodLevel = player.getFoodLevel();
|
|
||||||
|
|
||||||
packetSender.sendPlayerRespawn();
|
|
||||||
|
|
||||||
player.teleport(player.getLocation(), PlayerTeleportEvent.TeleportCause.PLUGIN);
|
|
||||||
player.setAllowFlight(wasAllowedToFly);
|
|
||||||
player.setFlying(wasFlying);
|
|
||||||
player.updateInventory();
|
|
||||||
player.sendHealthUpdate();
|
|
||||||
player.setFoodLevel(foodLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
private NickoProfile getNickoProfile() {
|
private NickoProfile getNickoProfile() {
|
||||||
final Optional<NickoProfile> optionalProfile = dataStore.getData(player.getUniqueId());
|
final Optional<NickoProfile> optionalProfile = dataStore.getData(player.getUniqueId());
|
||||||
return optionalProfile.orElse(NickoProfile.EMPTY_PROFILE.clone());
|
return optionalProfile.orElse(NickoProfile.EMPTY_PROFILE.clone());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue