From a058f13d6eca7679a92c1bdf82e55d2fdb3fdd6c Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 9 Dec 2019 21:34:26 +0100 Subject: [PATCH] Updates --- build.gradle.kts | 2 +- splash.txt | 21 ----------------- .../bukkit/BukkitBlockCommandSender.java | 22 ++++++++---------- .../command/argument/FactoryConverter.java | 5 ++-- worldedit-logo.png | Bin 9124 -> 0 bytes 5 files changed, 14 insertions(+), 36 deletions(-) delete mode 100644 splash.txt delete mode 100644 worldedit-logo.png diff --git a/build.gradle.kts b/build.gradle.kts index a208e540e..c8795df6c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ logger.lifecycle(""" 1) Read COMPILING.md if you haven't yet 2) Try running 'build' in a separate Gradle run 3) Use gradlew and not gradle - 4) If you still need help, ask on Discord! https://discord.gg/enginehub + 4) If you still need help, ask on Discord! https://discord.gg/ngZCzbU Output files will be in [subproject]/build/libs ******************************************* diff --git a/splash.txt b/splash.txt deleted file mode 100644 index 6513022a7..000000000 --- a/splash.txt +++ /dev/null @@ -1,21 +0,0 @@ - -============= You are compiling: ============= - _______ ___ ____ __ ____ _______ -| ____| / \ \ \ / \ / / | ____| -| |__ / ^ \ \ \/ \/ / | |__ -| __| / /_\ \ \ / | __| -| | / _____ \ \ /\ / | |____ -|__| /__/ \__\ \__/ \__/ |_______| - -======== Authors https://git.io/fjIDU ======== - -If you encounter trouble: - - Run `build` in a separate Gradle run - - Use gradlew and not gradle - - Ask us! - - https://discord.gg/ngZCzbU (Discord) - -Files will be output to `/target` - -============================================== - diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java index 58d4f12bf..3c293f6f3 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java @@ -19,10 +19,7 @@ package com.sk89q.worldedit.bukkit; -import static com.google.common.base.Preconditions.checkNotNull; - import com.sk89q.worldedit.WorldEdit; - import com.sk89q.worldedit.extension.platform.AbstractNonPlayerActor; import com.sk89q.worldedit.extension.platform.Locatable; import com.sk89q.worldedit.extent.Extent; @@ -31,22 +28,24 @@ import com.sk89q.worldedit.util.Location; import com.sk89q.worldedit.util.auth.AuthorizationException; import com.sk89q.worldedit.util.formatting.WorldEditText; import com.sk89q.worldedit.util.formatting.text.Component; -import com.sk89q.worldedit.util.formatting.text.TextComponent; import com.sk89q.worldedit.util.formatting.text.adapter.bukkit.TextAdapter; -import com.sk89q.worldedit.util.formatting.text.format.TextColor; -import java.util.UUID; -import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.command.BlockCommandSender; - -import java.util.Locale; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.nio.charset.StandardCharsets; +import java.util.Locale; +import java.util.UUID; + +import static com.google.common.base.Preconditions.checkNotNull; + public class BukkitBlockCommandSender extends AbstractNonPlayerActor implements Locatable { + private static final String UUID_PREFIX = "CMD"; + private final BlockCommandSender sender; private final WorldEditPlugin plugin; private final Location location; @@ -59,7 +58,7 @@ public class BukkitBlockCommandSender extends AbstractNonPlayerActor implements this.plugin = plugin; this.sender = sender; this.location = BukkitAdapter.adapt(sender.getBlock().getLocation()); - this.uuid = new UUID(location.toVector().toBlockPoint().hashCode(), location.getExtent().hashCode()); + this.uuid = UUID.nameUUIDFromBytes((UUID_PREFIX + sender.getName()).getBytes(StandardCharsets.UTF_8)); } @Override @@ -134,7 +133,6 @@ public class BukkitBlockCommandSender extends AbstractNonPlayerActor implements @Override public SessionKey getSessionKey() { return new SessionKey() { - @Nullable @Override public String getName() { return sender.getName(); @@ -154,7 +152,7 @@ public class BukkitBlockCommandSender extends AbstractNonPlayerActor implements @Override public boolean isPersistent() { - return false; + return true; } @Override diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java index d475c387c..5b880f726 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/FactoryConverter.java @@ -27,6 +27,7 @@ import com.sk89q.worldedit.entity.Entity; import com.sk89q.worldedit.extension.input.InputParseException; import com.sk89q.worldedit.extension.input.ParserContext; import com.sk89q.worldedit.extension.platform.Actor; +import com.sk89q.worldedit.extension.platform.Locatable; import com.sk89q.worldedit.extent.Extent; import com.sk89q.worldedit.extent.transform.BlockTransformExtent; import com.sk89q.worldedit.function.mask.Mask; @@ -104,8 +105,8 @@ public class FactoryConverter implements ArgumentConverter { ParserContext parserContext = new ParserContext(); parserContext.setActor(actor); - if (actor instanceof Entity) { - Extent extent = ((Entity) actor).getExtent(); + if (actor instanceof Locatable) { + Extent extent = ((Locatable) actor).getExtent(); if (extent instanceof World) { parserContext.setWorld((World) extent); } diff --git a/worldedit-logo.png b/worldedit-logo.png deleted file mode 100644 index e0b515743ce40641cfdc045b1bc0e9e28dc32fe2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9124 zcmaKSWmp^S+AS1mad#+?;;zM^NRT2$g1bYJ1a~i9q);463lz8F?tun(FYZtrg7-_` zZ|{B1kF(GGNSLag7Dqxtp|c0+x$CK_h+2Z3xXl0B zaCtjH5NISMaVc+zxut`(JDr8Kt-Z4Z;H0$^Kxc0y0nimxDybmHEk2m&W-cXK*#Cr4*DQEv&rKfI!d_21Ln0J?un+#MtU{~MH^sydx4 z*wva&kc)@YlIJxK-D_ShUVZ@~At4SrJ|12kZXP~vUOrA=W97h>9!}QI?*GPG{Rb=0^Ix%l2f+z~@GNKT zYVT=nCGQG$qWdRdQTzWMi`;+Z`xn;gzs3Rt{#PtFA{g$!ZT-L6{O?nU+4;Nt&(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