本文整理匯總了Java中nova.core.network.NetworkTarget.Side.CLIENT屬性的典型用法代碼示例。如果您正苦於以下問題:Java Side.CLIENT屬性的具體用法?Java Side.CLIENT怎麽用?Java Side.CLIENT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類nova.core.network.NetworkTarget.Side
的用法示例。
在下文中一共展示了Side.CLIENT屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: closeGui
/**
* Closes the currently open NOVA {@link Gui} on the client side, if
* present, and returns to the in-game GUI. It will not affect any native
* GUIs that might exist along with NOVA.
* @throws IllegalSideException if called on the server side
*/
@Sided(Side.CLIENT)
public void closeGui() {
Side.assertSide(Side.CLIENT);
Optional<Gui> active = getActiveGui();
if (active.isPresent()) {
closeGui(active.get());
}
}
示例2: getActiveGui
/**
* Returns the active NOVA {@link Gui} on the client side, if present.
* @return NOVA {@link Gui}
* @throws IllegalSideException if called on the server side
*/
@Sided(Side.CLIENT)
public Optional<Gui> getActiveGui() {
Side.assertSide(Side.CLIENT);
return getActiveGuiImpl();
}
示例3: getSide
/**
* Use {@link Side#get()} instead.
*
* @return active side
*/
public final Side getSide() {
return isClient() ? Side.CLIENT : Side.SERVER;
}