mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-12-29 12:37:53 +01:00
*
This commit is contained in:
parent
5fdad79469
commit
72d85e0754
@ -71,4 +71,8 @@ public class FaweNukkitPlayer extends FawePlayer<Player> {
|
||||
return new NukkitPlayer((NukkitPlatform) Fawe.<FaweNukkit> imp().getPlugin().getPlatform(), parent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSneaking() {
|
||||
return parent.isSneaking();
|
||||
}
|
||||
}
|
||||
|
@ -8,8 +8,10 @@ import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.Platform;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import org.spongepowered.api.Sponge;
|
||||
import org.spongepowered.api.data.manipulator.mutable.entity.SneakingData;
|
||||
import org.spongepowered.api.entity.living.player.Player;
|
||||
import org.spongepowered.api.text.Text;
|
||||
import org.spongepowered.api.text.serializer.TextSerializers;
|
||||
@ -89,4 +91,13 @@ public class SpongePlayer extends FawePlayer<Player> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSneaking() {
|
||||
Optional<SneakingData> sneak = parent.get(SneakingData.class);
|
||||
if (sneak.isPresent() && sneak.get().sneaking().get()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user