From a354267e852d81d1c2bac13eb46f811b9ee76999 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Sun, 19 Aug 2018 13:41:38 +1000 Subject: [PATCH] Try sending fake operator packets to support non-OP --- .../sk89q/worldedit/bukkit/BukkitPlayer.java | 4 ++++ .../bukkit/adapter/BukkitImplAdapter.java | 8 ++++++++ .../bukkit/adapter/impl/Spigot_v1_13_R1.class | Bin 21176 -> 21445 bytes 3 files changed, 12 insertions(+) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java index 852d95739..46a0564a6 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java @@ -33,6 +33,7 @@ import com.sk89q.worldedit.session.SessionKey; import com.sk89q.worldedit.util.HandSide; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.block.BlockStateHolder; +import com.sk89q.worldedit.world.block.BlockTypes; import com.sk89q.worldedit.world.gamemode.GameMode; import com.sk89q.worldedit.world.gamemode.GameModes; import org.bukkit.Bukkit; @@ -252,6 +253,9 @@ public class BukkitPlayer extends AbstractPlayerActor { BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter(); if (adapter != null) { adapter.sendFakeNBT(player, pos, ((BaseBlock) block).getNbtData()); + if (block.getBlockType() == BlockTypes.STRUCTURE_BLOCK) { + adapter.sendFakeOP(player); + } } } } diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java index 344eca9d9..d075cac45 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java @@ -113,4 +113,12 @@ public interface BukkitImplAdapter { * @param nbtData The NBT Data */ void sendFakeNBT(Player player, Vector pos, CompoundTag nbtData); + + /** + * Make the client think it has operator status. + * This does not give them any operator capabilities. + * + * @param player The player + */ + void sendFakeOP(Player player); } diff --git a/worldedit-bukkit/src/main/resources/com/sk89q/worldedit/bukkit/adapter/impl/Spigot_v1_13_R1.class b/worldedit-bukkit/src/main/resources/com/sk89q/worldedit/bukkit/adapter/impl/Spigot_v1_13_R1.class index adda1cf85d1a0bd6e716514bd8b309c0fd66d7f3..80124e9d9948374cc61cdd820e7cf18e57728513 100644 GIT binary patch delta 6886 zcmZWu2Y6LQ)1H~VH=CS$5<(y$2_z(RlF*w5Ap`{Jppm8^BBCM+3PDBvxQGoEr5r^Q zq)JuLVDMf-1OWxHgNhAN?4sBU!bkbvISIw@*M~iOW_M?2-g#$s&&{TlymK{&Uq88d zD-pFfyB+$AE410{P$E}4{336Oqm#VV@=FeHd7By??Z<_;_$}~)#Fbr@7L$2DmtKp zpJ{^ypYuV7zu+&m`AT2EcK93q*5U8?d&`IP`GYn;YI9hdpF;dI|Kjkk{F_5f`FG2I zIMj;&boej++wu{I+Nzr;`5$enxWl6u`(Dukc%Cf$)ASg z5-AGFr830IP={v8us9hmBdlB&cI0wI5Y3O;9Cqj-8R^InBwX~^2j zRUsKGwY7J(Lmg$Dm20eA>rjbY=TNDPw{pFe2@Wli8ys3JH(Hr!Ws*b7z|6?yz#FmH#+YCet0-AYqNq3@dlV z$xOLBR_;+`@3nHDmHQpqtQJisIk;YRg)wIgd}t-^4#y8W~x&&WDOVX6~`t@@o0)V2%X#BN@s!+fl;1%Tt{}oQO%U zA-23&s-*E??iIzgwI_$C||hpC2wSE=4B^kdm~d4 zYkehOyDV(1eB;Wu@*PuSj5YRFq-1sf-jzeV#FZc9N0$Q}v~n2!x$=|z?8-0lE4*{% zH~HO_KjcqW{*u3~9C76zIqJ$W+0T^Y723?+1IAArH+J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