Hacky command support

Some plugins (PerWorldPlugins) use a hacky command structure like MassiveCore does.
Their command strcuture aims to limit commands per world.
This will make it a tiny bit easier, so they don't need,
special support system for MassiveCore, and don't have to update it.
Other plugins might also use this, but atleast it doesn't hurt us.
This commit is contained in:
Magnus Ulf 2014-12-29 23:03:13 +01:00 committed by Olof Larsson
parent 23d1156424
commit da3549da0e

View File

@ -8,12 +8,14 @@ import java.util.TreeSet;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.plugin.Plugin;
import com.massivecraft.massivecore.mixin.Mixin; import com.massivecraft.massivecore.mixin.Mixin;
import com.massivecraft.massivecore.util.IdUtil; import com.massivecraft.massivecore.util.IdUtil;
import com.massivecraft.massivecore.util.Txt; import com.massivecraft.massivecore.util.Txt;
public class MassiveCoreBukkitCommand extends Command public class MassiveCoreBukkitCommand extends Command implements PluginIdentifiableCommand
{ {
// -------------------------------------------- // // -------------------------------------------- //
// FIELDS // FIELDS
@ -95,4 +97,14 @@ public class MassiveCoreBukkitCommand extends Command
return new ArrayList<String>(ret); return new ArrayList<String>(ret);
} }
// -------------------------------------------- //
// OVERRIDE: PLUGIN IDENTIFIABLE COMMAND
// -------------------------------------------- //
@Override
public Plugin getPlugin()
{
return massiveCommand.getRegisteredPlugin();
}
} }