@Test public void testSelection() throws Exception { Prison.get().getSelectionManager(); World ourWorld = new TestWorld("TestWorld"); TestPlayer ourPlayer = new TestPlayer(); ItemStack coloredToolItemStack = SelectionManager.SELECTION_TOOL; coloredToolItemStack .setDisplayName(Text.translateAmpColorCodes(coloredToolItemStack.getDisplayName())); Prison.get().getEventBus().post(new PlayerInteractEvent(ourPlayer, coloredToolItemStack, PlayerInteractEvent.Action.LEFT_CLICK_BLOCK, new Location(ourWorld, 10, 20, 30))); assertTrue(ourPlayer.getInput().contains("&7First position set to &8(10, 20, 30)")); Prison.get().getEventBus().post(new PlayerInteractEvent(ourPlayer, coloredToolItemStack, PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK, new Location(ourWorld, 30, 20, 40))); assertTrue(ourPlayer.getInput().contains("&7Second position set to &8(30, 20, 40)")); }
public Selection() { }
Selection { public Selection() { } }
Selection { public Selection() { } Selection();  Selection(Location min, Location max); }
Selection { public Selection() { } Selection();  Selection(Location min, Location max); Location getMin(); void setMin(Location min); Location getMax(); void setMax(Location max); boolean isComplete(); Bounds asBounds(); }
Selection { public Selection() { } Selection();  Selection(Location min, Location max); Location getMin(); void setMin(Location min); Location getMax(); void setMax(Location max); boolean isComplete(); Bounds asBounds();  }