Merge pull request #111 from Goodbird-git/screen-size

Implemented the ability to get the screen size from server
This commit is contained in:
Kam authored and GitHub committed 2024-01-18 15:06:44 -05:00
commit f3e162dafe
6 files changed
+67 -1

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;
}