mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 22:15:06 +00:00
Fixed redundant function calls for saving player data in NoppesUtilServer when using isGUIOpen(). Added getServerTime() to NpcAPI.
This commit is contained in:
1 parent
77c2897109
commit
8a7f40189e
3 files changed
+7
-19
No files matched your search
@@ -707,16 +707,8 @@ public class NoppesUtilServer {
|
||||
}
|
||||
|
||||
public static void isGUIOpen(ByteBuf buffer, EntityPlayer player) throws IOException {
|
||||
EntityPlayer pl = MinecraftServer.getServer().getConfigurationManager().func_152612_a(player.getDisplayName());
|
||||
PlayerData playerdata;
|
||||
if(pl == null)
|
||||
playerdata = PlayerDataController.instance.getDataFromUsername(player.getDisplayName());
|
||||
else
|
||||
playerdata = PlayerDataController.instance.getPlayerData(pl);
|
||||
|
||||
PlayerData playerdata = PlayerDataController.instance.getPlayerData(player);
|
||||
boolean isGUIOpen = buffer.readBoolean();
|
||||
playerdata.setGUIOpen(isGUIOpen);
|
||||
|
||||
sendPlayerData(EnumPlayerData.Players, (EntityPlayerMP)player, player.getDisplayName());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user