Skip to content

Commit dd39954

Browse files
authored
Merge pull request #2 from CyberDie22/patch-1
Menu: Remove duplicated code from MenuManager#openMenu
2 parents 31f9c58 + f0b68cc commit dd39954

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/main/java/me/kodysimpson/simpapi/menu/MenuManager.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,7 @@ public static void setup(Server server, Plugin plugin, Class<? extends AbstractP
7979
* @throws MenuManagerNotSetupException Thrown if the setup() method has not been called and used properly
8080
*/
8181
public static void openMenu(Class<? extends Menu> menuClass, Player player) throws MenuManagerException, MenuManagerNotSetupException {
82-
83-
try {
84-
menuClass.getConstructor(AbstractPlayerMenuUtility.class).newInstance(getPlayerMenuUtility(player)).open();
85-
} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
86-
throw new MenuManagerException();
87-
}
88-
82+
openMenu(menuClass, getPlayerMenuUtility(player));
8983
}
9084

9185
/**

0 commit comments

Comments
 (0)