Added Actor, Player, Entity, BaseEntity.

This commit is contained in:
sk89q
2014-04-04 17:54:14 -07:00
parent db48f64585
commit bed5fa8fdc
10 changed files with 587 additions and 348 deletions

View File

@ -314,7 +314,7 @@ public class WorldEdit {
@Deprecated
public BaseBlock getBlock(LocalPlayer player, String arg, boolean allAllowed, boolean allowNoData) throws WorldEditException {
ParserContext context = new ParserContext();
context.setPlayer(player);
context.setActor(player);
context.setWorld(player.getWorld());
context.setSession(getSession(player));
context.setRestricted(!allAllowed);
@ -383,7 +383,7 @@ public class WorldEdit {
@SuppressWarnings("deprecation")
public Pattern getBlockPattern(LocalPlayer player, String input) throws WorldEditException {
ParserContext context = new ParserContext();
context.setPlayer(player);
context.setActor(player);
context.setWorld(player.getWorld());
context.setSession(getSession(player));
return Patterns.wrap(getPatternRegistry().parseFromInput(input, context));
@ -396,7 +396,7 @@ public class WorldEdit {
@SuppressWarnings("deprecation")
public Mask getBlockMask(LocalPlayer player, LocalSession session, String input) throws WorldEditException {
ParserContext context = new ParserContext();
context.setPlayer(player);
context.setActor(player);
context.setWorld(player.getWorld());
context.setSession(session);
return Masks.wrap(getMaskRegistry().parseFromInput(input, context));