Skip to content

Conversation

TheMeinerLP
Copy link
Member

Overview

Fixes #3303

Description

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@TheMeinerLP TheMeinerLP requested a review from a team as a code owner September 16, 2025 21:14
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Sep 16, 2025
@PierreSchwang
Copy link
Member

java.lang.IllegalStateException: No converter for type Key{type=com.sk89q.worldedit.entity.Player, annotationWrapper=NullAnnotationWrapper}

@TheMeinerLP
Copy link
Member Author

java.lang.IllegalStateException: No converter for type Key{type=com.sk89q.worldedit.entity.Player, annotationWrapper=NullAnnotationWrapper}

@MattBDev told me already it

@TheMeinerLP TheMeinerLP marked this pull request as draft September 16, 2025 22:06
@TheMeinerLP
Copy link
Member Author

@PierreSchwang its more complicated because something has changed in paper since 2 versions.

@PierreSchwang
Copy link
Member

I mean, simply keeping the UUID and not looking up the UUID for suggestions would be a quick and working fix:

Index: worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/ConsumeBindings.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/ConsumeBindings.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/ConsumeBindings.java
--- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/ConsumeBindings.java	(revision d83f24a772ab5346a826a9bf8f418cd23ce339b2)
+++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/platform/binding/ConsumeBindings.java	(date 1758062137429)
@@ -29,6 +29,7 @@
 import com.sk89q.worldedit.world.block.BlockType;
 import org.enginehub.piston.exception.StopExecutionException;
 import org.enginehub.piston.inject.InjectedValueAccess;
+import org.enginehub.piston.inject.Key;
 
 import java.util.UUID;
 
@@ -153,7 +154,7 @@
     }
 
     @Binding
-    public UUID playerUUID(Actor actor, String argument) {
+    public UUID playerUUID(Actor actor, InjectedValueAccess context, String argument) {
         if (argument.equals("me")) {
             return actor.getUniqueId();
         }
@@ -167,6 +168,10 @@
         if (argument.length() > 16) {
             uuid = UUID.fromString(argument);
         } else {
+            // if the command is parsed for suggestions, we just return the actors UUID
+            if (context.injectedValue(Key.of(boolean.class)).orElse(false)) {
+                return actor.getUniqueId();
+            }
             uuid = Fawe.platform().getUUID(argument);
         }
         if (uuid == null) {

There is no reason to get the actual UUID for suggestions either way imo

@TheMeinerLP
Copy link
Member Author

Thanks @PierreSchwang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugfix This PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

//history list <player> yields exception before completion

2 participants