public class EditSessionFactory
extends java.lang.Object
EditSession
s. To get an instance of this factory,
use WorldEdit.getEditSessionFactory()
.
It is no longer possible to replace the instance of this in WorldEdit
with a custom one. Use EditSessionEvent
to override
the creation of EditSession
s.
Constructor and Description |
---|
EditSessionFactory() |
Modifier and Type | Method and Description |
---|---|
EditSession |
getEditSession(World world,
int maxBlocks)
Construct an edit session with a maximum number of blocks.
|
EditSession |
getEditSession(World world,
int maxBlocks,
BlockBag blockBag)
Construct an edit session with a maximum number of blocks and a block bag.
|
EditSession |
getEditSession(World world,
int maxBlocks,
BlockBag blockBag,
Player player)
Construct an edit session with a maximum number of blocks and a block bag.
|
EditSession |
getEditSession(World world,
int maxBlocks,
Player player)
Construct an edit session with a maximum number of blocks.
|
public EditSession getEditSession(World world, int maxBlocks)
world
- the worldmaxBlocks
- the maximum number of blocks that can be changed, or -1 to use no limitpublic EditSession getEditSession(World world, int maxBlocks, Player player)
world
- the worldmaxBlocks
- the maximum number of blocks that can be changed, or -1 to use no limitplayer
- the player that the EditSession
is forpublic EditSession getEditSession(World world, int maxBlocks, BlockBag blockBag)
world
- the worldmaxBlocks
- the maximum number of blocks that can be changed, or -1 to use no limitblockBag
- an optional BlockBag
to use, otherwise nullpublic EditSession getEditSession(World world, int maxBlocks, BlockBag blockBag, Player player)
world
- the worldmaxBlocks
- the maximum number of blocks that can be changed, or -1 to use no limitblockBag
- an optional BlockBag
to use, otherwise nullplayer
- the player that the EditSession
is for