Package org.bukkit.inventory

Examples of org.bukkit.inventory.ItemFactory


        e.printStackTrace();
      }
     
      // Mock the server object
      Server mockedServer = mock(Server.class);
      ItemFactory mockedFactory = mock(CraftItemFactory.class);
      ItemMeta mockedMeta = mock(ItemMeta.class);
 
      when(mockedServer.getItemFactory()).thenReturn(mockedFactory);
      when(mockedServer.isPrimaryThread()).thenReturn(true);
      when(mockedFactory.getItemMeta(any(Material.class))).thenReturn(mockedMeta);
 
      // Inject this fake server
      FieldUtils.writeStaticField(Bukkit.class, "server", mockedServer, true);
     
      // And the fake item factory
View Full Code Here

TOP

Related Classes of org.bukkit.inventory.ItemFactory

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.