Skip to content

Commit

Permalink
Fix crash when executing commands from signs (#156)
Browse files Browse the repository at this point in the history
* fix legacy-fabric-permissions-api-v1

* Fix inner class field name

* bump permissions-api-v1 version

---------

Co-authored-by: Luke Schwager <luke@blucobalt.dev>
  • Loading branch information
thecatcore and BluCobalt committed Feb 10, 2024
1 parent 8b01b57 commit 6be689d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ legacy-fabric-keybindings-api-v1.version = 1.0.1
legacy-fabric-lifecycle-events-v1.version = 1.0.1
legacy-fabric-logger-api-v1.version = 1.0.4
legacy-fabric-networking-api-v1.version = 2.0.0
legacy-fabric-permissions-api-v1.version = 1.0.0
legacy-fabric-permissions-api-v1.version = 1.0.1
legacy-fabric-registry-sync-api-v1.version = 2.1.0
legacy-fabric-rendering-api-v1.version = 1.0.0
legacy-fabric-resource-loader-v1.version = 2.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@

@Mixin(targets = "net/minecraft/block/entity/SignBlockEntity$2")
public abstract class SignBlockEntity_2Mixin implements PermissibleCommandSource {
@SuppressWarnings("ShadowTarget")
@Final
@Dynamic
@Shadow
PlayerEntity editor;
PlayerEntity field_9859;

@Override
public boolean hasPermission(String perm) {
return ((PermissibleCommandSource) this.editor).hasPermission(perm);
return ((PermissibleCommandSource) this.field_9859).hasPermission(perm);
}
}

0 comments on commit 6be689d

Please sign in to comment.