mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Try sending fake operator packets to support non-OP
This commit is contained in:
parent
4d0df10f88
commit
a354267e85
@ -33,6 +33,7 @@ import com.sk89q.worldedit.session.SessionKey;
|
|||||||
import com.sk89q.worldedit.util.HandSide;
|
import com.sk89q.worldedit.util.HandSide;
|
||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
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.GameMode;
|
||||||
import com.sk89q.worldedit.world.gamemode.GameModes;
|
import com.sk89q.worldedit.world.gamemode.GameModes;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@ -252,6 +253,9 @@ public class BukkitPlayer extends AbstractPlayerActor {
|
|||||||
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
|
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
|
||||||
if (adapter != null) {
|
if (adapter != null) {
|
||||||
adapter.sendFakeNBT(player, pos, ((BaseBlock) block).getNbtData());
|
adapter.sendFakeNBT(player, pos, ((BaseBlock) block).getNbtData());
|
||||||
|
if (block.getBlockType() == BlockTypes.STRUCTURE_BLOCK) {
|
||||||
|
adapter.sendFakeOP(player);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -113,4 +113,12 @@ public interface BukkitImplAdapter {
|
|||||||
* @param nbtData The NBT Data
|
* @param nbtData The NBT Data
|
||||||
*/
|
*/
|
||||||
void sendFakeNBT(Player player, Vector pos, CompoundTag nbtData);
|
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);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user