@Override
	public void serviceRemoved(Class<?> interfaceClass, Object service) {
		if (interfaceClass == ClipboardService.class) {
			for (TerminalProvider p : providers) {
				p.setClipboardService(null);
			}
		}
	}
The plugin that provides {@link TerminalService}
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPlugin.java