Package org.bukkit.command

Examples of org.bukkit.command.Command


    }

    @Test
    public void test() throws Exception {
        // Initialize a fake command
        Command mockCommand = mock(Command.class);
        when(mockCommand.getName()).thenReturn("mv");

        // Import the first world
        String[] normalArgs = new String[] { "import", "world", "normal" };
        core.onCommand(mockCommandSender, mockCommand, "", normalArgs);
        verify(mockCommandSender).sendMessage("Starting import of world 'world'...");
View Full Code Here


        creator.tearDown();
    }

    @Test
    public void testSetHidden() {
        Command cmd = mock(Command.class);
        when(cmd.getName()).thenReturn("mv");

        MultiverseWorld world = core.getMVWorldManager().getMVWorld("world");
        assertNotNull(world);

        assertFalse(world.isHidden()); // ensure it's not hidden now
View Full Code Here

        // Make a fake server folder to fool MV into thinking a world folder exists.
        File serverDirectory = new File(creator.getCore().getServerFolder(), "world");
        serverDirectory.mkdirs();

        // Initialize a fake command
        Command mockCommand = mock(Command.class);
        when(mockCommand.getName()).thenReturn("mv");

        // Assert debug mode is off
        Assert.assertEquals(0, core.getMVConfig().getGlobalDebug());

        // Send the debug command.
View Full Code Here

TOP

Related Classes of org.bukkit.command.Command

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.