Commit 7f789a6
committed
Make ItemPreUpdateEvent#newItem immutable
Previously, the newItem could be modified / replaced and changes would sometimes be reflected in the source. However, this was not consistent and could in other cases lead to e.g. items being deleted. This commit removes the functionality to modify the newItem.1 parent ab83600 commit 7f789a6
4 files changed
Lines changed: 6 additions & 29 deletions
File tree
- invui/src
- main/java/xyz/xenondevs/invui/inventory/event
- test/java/xyz/xenondevs/invui/inventory
Lines changed: 1 addition & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| |||
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 42 | | |
56 | 43 | | |
57 | 44 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
63 | | - | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | | - | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
188 | | - | |
189 | 187 | | |
190 | 188 | | |
191 | | - | |
192 | 189 | | |
193 | 190 | | |
194 | 191 | | |
195 | | - | |
196 | 192 | | |
197 | 193 | | |
198 | 194 | | |
199 | | - | |
200 | 195 | | |
201 | 196 | | |
202 | 197 | | |
203 | | - | |
204 | 198 | | |
205 | 199 | | |
206 | 200 | | |
| |||
Lines changed: 0 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
176 | | - | |
177 | 175 | | |
178 | 176 | | |
179 | | - | |
180 | 177 | | |
181 | 178 | | |
182 | 179 | | |
183 | | - | |
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | 183 | | |
189 | 184 | | |
190 | 185 | | |
191 | | - | |
192 | 186 | | |
193 | 187 | | |
194 | 188 | | |
| |||
0 commit comments