mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Fix TooltipContext.create
being wrong(#11254)
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
parent
f05a7d0a96
commit
fe4996a080
1 changed files with 3 additions and 3 deletions
|
@ -95,16 +95,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+record TooltipContextImpl(boolean isCreative, boolean isAdvanced) implements TooltipContext {
|
||||
+record TooltipContextImpl(boolean isAdvanced, boolean isCreative) implements TooltipContext {
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull TooltipContext asCreative() {
|
||||
+ return new TooltipContextImpl(true, this.isAdvanced);
|
||||
+ return new TooltipContextImpl(this.isAdvanced, true);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull TooltipContext asAdvanced() {
|
||||
+ return new TooltipContextImpl(this.isCreative, true);
|
||||
+ return new TooltipContextImpl(true, this.isCreative);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
|
|
Loading…
Reference in a new issue