Implemented the ability to get the screen size from server

This commit is contained in:
Goodbird committed 2024-01-05 16:31:57 +03:00
1 parent 03aa9c2e9a
commit c3b134b5ae
6 files changed
+67 -3

No files matched your search

@@ -18,6 +18,7 @@ import noppes.npcs.entity.data.DataSkinOverlays;
import noppes.npcs.entity.data.DataTimers;
import noppes.npcs.roles.RoleCompanion;
import noppes.npcs.scripted.NpcAPI;
import noppes.npcs.scripted.ScreenSize;
import noppes.npcs.util.CustomNPCsThreader;
import noppes.npcs.util.NBTJsonUtil;
@@ -52,6 +53,8 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
public boolean isGUIOpen = false;
public ScreenSize screenSize = new ScreenSize(-1,-1);
@Override
public void saveNBTData(NBTTagCompound nbtTagCompound) {
}
@@ -136,6 +139,14 @@ public class PlayerData implements IExtendedEntityProperties, IPlayerData {
return this.isGUIOpen;
}
public ScreenSize getScreenSize(){
return screenSize;
}
public void setScreenSize(ScreenSize size){
screenSize = size;
}
public boolean hasCompanion(){
return activeCompanion != null && !activeCompanion.isDead;
}