File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
shared/src/main/java/me/saiintbrisson/minecraft Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
package me .saiintbrisson .minecraft ;
2
2
3
+ import java .util .ArrayList ;
3
4
import java .util .Collections ;
4
5
import java .util .HashMap ;
5
6
import java .util .Map ;
@@ -500,6 +501,12 @@ final ViewItem resolve(int index) {
500
501
return super .resolve (index );
501
502
}
502
503
504
+ /** {@inheritDoc} */
505
+ @ Override
506
+ public final void update () {
507
+ for (final ViewContext context : new ArrayList <>(contexts )) context .update ();
508
+ }
509
+
503
510
final void prepareClose (@ NotNull CloseViewContext context ) {
504
511
getPipeline ().execute (CLOSE , context );
505
512
}
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ public final ItemStack getItem() {
58
58
return item ;
59
59
}
60
60
61
+ @ Override
62
+ public final void update (@ NotNull ViewContext context ) {
63
+ getParent ().update ();
64
+ }
65
+
61
66
@ Override
62
67
public final void updateItem (Consumer <ItemWrapper > updater ) {
63
68
inventoryModificationTriggered ();
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ private Object unwrap(Object item) {
210
210
211
211
/** {@inheritDoc} */
212
212
@ Override
213
- public final void update () {
213
+ public void update () {
214
214
throw new UnsupportedOperationException ("Update aren't supported in this view" );
215
215
}
216
216
Original file line number Diff line number Diff line change @@ -147,6 +147,11 @@ public final String getUpdatedTitle() {
147
147
return getAttributes ().getUpdatedTitle ();
148
148
}
149
149
150
+ @ Override
151
+ public final void update () {
152
+ getRoot ().update (this );
153
+ }
154
+
150
155
@ Override
151
156
public final void close () {
152
157
getAttributes ().setMarkedToClose (true );
You can’t perform that action at this time.
0 commit comments