本文整理汇总了Java中net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent类的典型用法代码示例。如果您正苦于以下问题:Java ClientDisconnectionFromServerEvent类的具体用法?Java ClientDisconnectionFromServerEvent怎么用?Java ClientDisconnectionFromServerEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClientDisconnectionFromServerEvent类属于net.minecraftforge.fml.common.network.FMLNetworkEvent包,在下文中一共展示了ClientDisconnectionFromServerEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void onDisconnect(ClientDisconnectionFromServerEvent event) {
// write out all pending logs
OreLogger.instance.getLogger().pollAndWrite();
// reset save file so a new one is created if the player connects again
OreLogger.instance.getLogger().resetSaveFile();
}
示例2: clientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void clientDisconnect(ClientDisconnectionFromServerEvent event)
{
if (!event.getManager().isLocalChannel())
{
ClientHandler.getInstance().cleanUp();
}
}
示例3: clientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@Override
public void clientDisconnect(@Nonnull final ClientDisconnectionFromServerEvent event) {
Minecraft.getMinecraft().addScheduledTask(new Runnable() {
public void run() {
EffectManager.unregister();
GuiHUDHandler.unregister();
ProxyClient.this.connectionTime = 0;
}
});
}
示例4: onClientDisconnectServer
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
/**
* Runs on the client
*/
public void onClientDisconnectServer(ClientDisconnectionFromServerEvent event)
{
if(WorldGen.getInstance() != null)
{
WorldGen.getInstance().resetCache();
WorldGen.ClearInstances();
ChunkLoadHandler.loadedCentersMap.clear();
}
}
示例5: playerDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
/**
* Does cleanup stuff on disconnect from a server
*/
@SubscribeEvent
public void playerDisconnect(ClientDisconnectionFromServerEvent event) {
AppliedPatches patches = PatchManager.instance().getGlobalAppliedPatches();
patches.setPatchSuccessfullyApplied(PatchList.SERVER_MODDED, false);
patches.setPatchSuccessfullyApplied(PatchList.HANDSHAKE_FINISHED, false);
PacketHandlerClient.reregisterAndClearRemovedCmds();
MoreCommands.getProxy().playerNotified = false;
MoreCommandsConfig.enablePlayerAliases = MoreCommandsConfig.enablePlayerAliasesOriginal;
MoreCommandsConfig.enablePlayerVars = MoreCommandsConfig.enablePlayerVarsOriginal;
}
示例6: onDisconnectedFromServer
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
/** Resets all synced values of the settings after disconnecting. */
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onDisconnectedFromServer(ClientDisconnectionFromServerEvent event) {
if (!_connected) return;
getSettings().forEach(Setting::resetSynced);
_connected = false;
}
示例7: playerLoggedOut
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void playerLoggedOut(ClientDisconnectionFromServerEvent event) {
Autotip.onHypixel = false;
}
示例8: onPlayerLogout
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SuppressWarnings("static-method")
@SubscribeEvent
public void onPlayerLogout(ClientDisconnectionFromServerEvent event) {
syncConfig(false);
configLockedByServer = false;
}
示例9: clientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
public void clientDisconnect(@Nonnull final ClientDisconnectionFromServerEvent event) {
proxy.clientDisconnect(event);
installedOnServer = false;
}
示例10: clientDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
public void clientDisconnect(@Nonnull final ClientDisconnectionFromServerEvent event) {
// NOTHING SHOULD BE HERE - OVERRIDE IN ProxyClient!
}
示例11: onUserLogOut
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void onUserLogOut(ClientDisconnectionFromServerEvent event)
{
ClientProxy.manager.reset();
ClientProxy.recordingOverlay.setVisible(false);
}
示例12: onClientLogout
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void onClientLogout(ClientDisconnectionFromServerEvent event) {
cleanupClientWorld();
}
示例13: onDisconnect
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void onDisconnect(ClientDisconnectionFromServerEvent event) {
currentServer = "";
}
示例14: on
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void on(ClientDisconnectionFromServerEvent event) {
Log.info("Clearing Inventory Panel Client Database");
dbRegistry.clear();
}
示例15: onPlayerLogout
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientDisconnectionFromServerEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerLogout(final ClientDisconnectionFromServerEvent event) {
Log.info("Removed server config override for mod " + modid);
serverConfig = null;
generation++;
}