1 WorldEdit World Player
Jesse Boyd edited this page 2016-08-15 16:55:53 +10:00

WorldEdit has its own Player and World classes which will be needed for some methods.

Getting the WE World object:

WorldEdit.getInstance().getServer().getWorlds();
// Or for Bukkit specifically
BukkitUtil.getLocalWorld(bukkitWorld);

Getting the player

// Bukkit
WorldEditPlugin worldEdit = (WorldEditPlugin) Bukkit.getServer().getPluginManager().getPlugin("WorldEdit");
worldedit.wrapPlayer(bukkitPlayer);
// Forge
ForgeWorldEdit.inst.wrap(entityPlayer);
// Alternative with FAWE
FawePlayer.wrap(uuid or username or actor or player object here).getPlayer();

For use async see e.g. PlayerWrapper.wrap(player)