public variable to enum in PlayerSettings
This commit is contained in:
@@ -13,6 +13,7 @@ import mc.core.events.EventBusGetter;
|
||||
import mc.core.network.proto_1_12_2.TeleportManager;
|
||||
import mc.core.network.proto_1_12_2.packets.*;
|
||||
import mc.core.player.Player;
|
||||
import mc.core.player.PlayerSettings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -32,7 +33,7 @@ public class PlayHandler extends AbstractStateHandler implements PlayStateHandle
|
||||
|
||||
player.getSettings().setLocate(packet.getLocale());
|
||||
player.getSettings().setViewDistance(packet.getViewDistance());
|
||||
player.getSettings().setChatMode(packet.getChatMode());
|
||||
player.getSettings().setChatMode(PlayerSettings.ChatMode.getById(packet.getChatMode()));
|
||||
player.getSettings().setChatColors(packet.isChatColors());
|
||||
|
||||
player.getSettings().setCapeEnabled(packet.isCapeEnabled());
|
||||
@@ -43,7 +44,7 @@ public class PlayHandler extends AbstractStateHandler implements PlayStateHandle
|
||||
player.getSettings().setRightPantsLegEnabled(packet.isRightPantsLegEnabled());
|
||||
player.getSettings().setHatEnabled(packet.isHatEnabled());
|
||||
|
||||
player.getSettings().setMainHand(packet.getMainHand());
|
||||
player.getSettings().setMainHand(PlayerSettings.Hand.getById(packet.getMainHand()));
|
||||
}
|
||||
|
||||
@Handler
|
||||
|
||||
Reference in New Issue
Block a user