Unregister network channel from for registry when unbinding. Fixes
@@ -182,6 +182,9 @@ public void unbindChannel(ChannelBinding channel) {
SpongeModChannelBinding boundChannel = this.channelMap.remove(channel.getName());
checkState(boundChannel != null, "Channel is already unbound");
boundChannel.invalidate();
+ // Remove channel from forge's registry
+ NetworkRegistry.INSTANCE.channelNamesFor(Side.SERVER).remove(channel.getName());
+ NetworkRegistry.INSTANCE.channelNamesFor(Side.CLIENT).remove(channel.getName());
if (SpongeImpl.getGame().isServerAvailable()) {
final PlayerList playerList = SpongeImpl.getServer().getPlayerList();
