Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello,

Looks like IConnectionHandler is dissapeared in 1.7 and i still need something like that.

I searched but didn't find anything same like that.

Whats the new IConnectonHandler in 1.7.10?

How can i register that class? Because NetworkRegistry.instance().registerConnectionHandler is also dissapeared.

Thanks!

 

  • Author

Okey, thanks!

So far i made:

package com.fluffy.amnesia.handler;

import com.fluffy.amnesia.Amnesia;
import com.fluffy.amnesia.pakets.SettingsMessageHandler;

import net.minecraft.network.INetHandler;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.play.INetHandlerPlayClient;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.network.FMLNetworkEvent;

public class ConnectionHandler extends FMLNetworkEvent
{   
public ConnectionHandler(INetHandler thing, Class type, NetworkManager manager) {

	super(thing, type, manager);
}

@SubscribeEvent
public void onClientConnection(ClientConnectedToServerEvent event){
	Amnesia.snw.sendToAll(new SettingsMessageHandler());
}
}

 

There is a problem with the constructer because FMLNetworkEvent(stuffs...) is not visible.

Also i can use FMLCommonHandler to register it or there is something special for that?

Thanks!

  • Author

Ohhhhh my bad....

This shoud work now.

New code:

public class ConnectionHandler
{   
@SubscribeEvent
public void onClientConnection(ClientConnectedToServerEvent event){
	Amnesia.snw.sendToAll(new SettingsMessageHandler());
}
}

 

Im just using this for registering:

FMLCommonHandler.instance().bus().register(new ConnectionHandler());

Thanks for opening my eyes!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.