diff --git a/src/main/java/com/sk89q/bukkit/migration/PermissionsProvider.java b/src/main/java/com/sk89q/bukkit/migration/PermissionsProvider.java deleted file mode 100644 index 588d6f551..000000000 --- a/src/main/java/com/sk89q/bukkit/migration/PermissionsProvider.java +++ /dev/null @@ -1,32 +0,0 @@ -// $Id$ -/* - * WorldEdit - * Copyright (C) 2010, 2011 sk89q and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.sk89q.bukkit.migration; - -@Deprecated -public interface PermissionsProvider { - public boolean hasPermission(String name, String permission); - - public boolean hasPermission(String worldName, String name, String permission); - - public boolean inGroup(String player, String group); - - public String[] getGroups(String player); - -} diff --git a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolver.java b/src/main/java/com/sk89q/bukkit/migration/PermissionsResolver.java deleted file mode 100644 index bacdbb3da..000000000 --- a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolver.java +++ /dev/null @@ -1,25 +0,0 @@ -// $Id$ -/* - * WorldEdit - * Copyright (C) 2010 sk89q and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.sk89q.bukkit.migration; - - -@Deprecated -public interface PermissionsResolver extends com.sk89q.wepif.PermissionsResolver { -} diff --git a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java b/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java deleted file mode 100644 index fe58286fe..000000000 --- a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverManager.java +++ /dev/null @@ -1,86 +0,0 @@ -// $Id$ -/* - * WorldEdit - * Copyright (C) 2010 sk89q and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.sk89q.bukkit.migration; - -import java.util.logging.Logger; - -import com.sk89q.wepif.WEPIFRuntimeException; -import org.bukkit.Server; -import org.bukkit.plugin.Plugin; - -@Deprecated -public class PermissionsResolverManager implements PermissionsProvider { - - @Deprecated - public PermissionsResolverManager(org.bukkit.util.config.Configuration config, Server server, String name, Logger logger) {} - - @Deprecated - public PermissionsResolverManager(Plugin plugin, String name, Logger logger) { - setUp(plugin); - } - - @Deprecated - public void findResolver() { - getRealResolver().findResolver(); - } - - @Deprecated - public void setPluginPermissionsResolver(Plugin plugin) { - getRealResolver().setPluginPermissionsResolver(plugin); - } - - @Deprecated - public void load() { - try { - getRealResolver().load(); - } catch (WEPIFRuntimeException ignore) { - // Some plugins do this very early in the initialization process - } - } - - public boolean hasPermission(String name, String permission) { - return getRealResolver().hasPermission(name, permission); - } - - public boolean hasPermission(String worldName, String name, String permission) { - return getRealResolver().hasPermission(worldName, name, permission); - } - - public boolean inGroup(String player, String group) { - return getRealResolver().inGroup(player, group); - } - - public String[] getGroups(String player) { - return getRealResolver().getGroups(player); - } - - public String getDetectionMessage() { - return getRealResolver().getDetectionMessage(); - } - - void setUp(Plugin plugin) { - com.sk89q.wepif.PermissionsResolverManager.initialize(plugin); - } - - private com.sk89q.wepif.PermissionsResolverManager getRealResolver() { - return com.sk89q.wepif.PermissionsResolverManager.getInstance(); - } - -} diff --git a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java b/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java deleted file mode 100644 index fcd78de88..000000000 --- a/src/main/java/com/sk89q/bukkit/migration/PermissionsResolverServerListener.java +++ /dev/null @@ -1,45 +0,0 @@ -// $Id$ -/* - * WorldEdit - * Copyright (C) 2010 sk89q and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.sk89q.bukkit.migration; - -import org.bukkit.event.server.ServerListener; -import org.bukkit.plugin.Plugin; - -@Deprecated -public class PermissionsResolverServerListener extends ServerListener { - private PermissionsResolverManager manager; - - @Deprecated - public PermissionsResolverServerListener(PermissionsResolverManager manager) { - this.manager = manager; - } - - @Deprecated - public PermissionsResolverServerListener(PermissionsResolverManager manager, Plugin plugin) { - this.manager = manager; - register(plugin); - } - - @Deprecated - public void register(Plugin plugin) { - manager.setUp(plugin); - } - -} diff --git a/src/main/java/com/sk89q/wepif/LegacyPermissionsProviderWrapper.java b/src/main/java/com/sk89q/wepif/LegacyPermissionsProviderWrapper.java deleted file mode 100644 index 0dd5480ad..000000000 --- a/src/main/java/com/sk89q/wepif/LegacyPermissionsProviderWrapper.java +++ /dev/null @@ -1,81 +0,0 @@ -// $Id$ -/* - * WorldEdit - * Copyright (C) 2010 sk89q and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package com.sk89q.wepif; - -import org.bukkit.OfflinePlayer; -import org.bukkit.plugin.Plugin; - -@SuppressWarnings("deprecation") -public class LegacyPermissionsProviderWrapper implements PermissionsProvider { - private final com.sk89q.bukkit.migration.PermissionsProvider legacyPermissionsProvider; - - static PermissionsProvider wrap(Plugin plugin) { - if (!(plugin instanceof com.sk89q.bukkit.migration.PermissionsProvider)) { - return null; - } - - final com.sk89q.bukkit.migration.PermissionsProvider legacyPermissionsProvider = (com.sk89q.bukkit.migration.PermissionsProvider) plugin; - return new LegacyPermissionsProviderWrapper(legacyPermissionsProvider); - } - - private LegacyPermissionsProviderWrapper(com.sk89q.bukkit.migration.PermissionsProvider legacyPermissionsProvider) { - this.legacyPermissionsProvider = legacyPermissionsProvider; - } - - @Override - public boolean hasPermission(String name, String permission) { - return legacyPermissionsProvider.hasPermission(name, permission); - } - - @Override - public boolean hasPermission(String worldName, String name, String permission) { - return legacyPermissionsProvider.hasPermission(worldName, name, permission); - } - - @Override - public boolean inGroup(String player, String group) { - return legacyPermissionsProvider.inGroup(player, group); - } - - @Override - public String[] getGroups(String player) { - return legacyPermissionsProvider.getGroups(player); - } - - @Override - public boolean hasPermission(OfflinePlayer player, String permission) { - return legacyPermissionsProvider.hasPermission(player.getName(), permission); - } - - @Override - public boolean hasPermission(String worldName, OfflinePlayer player, String permission) { - return legacyPermissionsProvider.hasPermission(worldName, player.getName(), permission); - } - - @Override - public boolean inGroup(OfflinePlayer player, String group) { - return legacyPermissionsProvider.inGroup(player.getName(), group); - } - - @Override - public String[] getGroups(OfflinePlayer player) { - return legacyPermissionsProvider.getGroups(player.getName()); - } -} diff --git a/src/main/java/com/sk89q/wepif/PluginPermissionsResolver.java b/src/main/java/com/sk89q/wepif/PluginPermissionsResolver.java index 912cbd7a3..18e790b7b 100644 --- a/src/main/java/com/sk89q/wepif/PluginPermissionsResolver.java +++ b/src/main/java/com/sk89q/wepif/PluginPermissionsResolver.java @@ -43,11 +43,6 @@ public static PermissionsResolver factory(Server server, YAMLProcessor config) { if (plugin instanceof PermissionsProvider) { return new PluginPermissionsResolver((PermissionsProvider) plugin, plugin); } - - final PermissionsProvider legacyPermissionsProvider = LegacyPermissionsProviderWrapper.wrap(plugin); - if (legacyPermissionsProvider != null) { - return new PluginPermissionsResolver(legacyPermissionsProvider, plugin); - } } return null;