aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/MenuBackup.h
blob: 2de750b11faf153fa1c5f7988b0691bff2fb1378 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

class AbstractContainerMenu;
class Inventory;

class MenuBackup
{
private:
	unordered_map<short, ItemInstanceArray *> *backups;
	shared_ptr<Inventory> inventory;
	AbstractContainerMenu *menu;

public:
	MenuBackup(shared_ptr<Inventory> inventory, AbstractContainerMenu *menu);

	void save(short changeUid);

	// Cannot use delete as function name as it is a reserved keyword
	void deleteBackup(short changeUid);
	void rollback(short changeUid);
};