@@ -0,0 +1,1722 @@
+/*%0A * Copyright (c) 2016 MCPhoton %3Chttp://mcphoton.org%3E and contributors.%0A *%0A * This file is part of the Photon Server Implementation %3Chttps://github.com/mcphoton/Photon-Server%3E.%0A *%0A * The Photon Server Implementation is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * The Photon Server Implementation is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage org.mcphoton.impl.command;%0A%0Aimport org.mcphoton.command.Command;%0Aimport org.mcphoton.command.ServerCommandRegistry;%0Aimport org.mcphoton.command.WorldCommandRegistry;%0Aimport org.mcphoton.plugin.ServerPlugin;%0Aimport org.mcphoton.world.World;%0A%0A/**%0A * Implementation of %7B@link ServerCommandRegistry%7D. It internally uses the %7B@link WorldCommandRegistry%7D.%0A *%0A * @author TheElectronWill%0A */%0Apublic class ServerCommandRegistryImpl implements ServerCommandRegistry %7B%0A%0A%09@Override%0A%09public void register(Command cmd, ServerPlugin plugin) %7B%0A%09%09for (World world : plugin.getActiveWorlds()) %7B%0A%09%09%09world.getCommandRegistry().register(cmd, plugin);%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09public void unregister(Command cmd, ServerPlugin plugin) %7B%0A%09%09for (World world : plugin.getActiveWorlds()) %7B%0A%09%09%09world.getCommandRegistry().unregister(cmd, plugin);%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Implement the ServerCommandRegistry