@@ -0,0 +1,3294 @@
+/*%0A * This file is part of PV-Star for Bukkit, licensed under the MIT License (MIT).%0A *%0A * Copyright (c) JCThePants (www.jcwhatever.com)%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining a copy%0A * of this software and associated documentation files (the %22Software%22), to deal%0A * in the Software without restriction, including without limitation the rights%0A * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell%0A * copies of the Software, and to permit persons to whom the Software is%0A * furnished to do so, subject to the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be included in%0A * all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR%0A * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,%0A * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE%0A * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER%0A * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,%0A * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN%0A * THE SOFTWARE.%0A */%0A%0Apackage com.jcwhatever.pvs.commands.admin.arena;%0A%0Aimport com.jcwhatever.nucleus.managed.commands.CommandInfo;%0Aimport com.jcwhatever.nucleus.managed.commands.arguments.ICommandArguments;%0Aimport com.jcwhatever.nucleus.managed.commands.exceptions.CommandException;%0Aimport com.jcwhatever.nucleus.managed.commands.mixins.IExecutableCommand;%0Aimport com.jcwhatever.nucleus.managed.language.Localizable;%0Aimport com.jcwhatever.pvs.Lang;%0Aimport com.jcwhatever.pvs.api.arena.IArena;%0Aimport com.jcwhatever.pvs.api.arena.options.DropsCleanup;%0Aimport com.jcwhatever.pvs.api.commands.AbstractPVCommand;%0Aimport org.bukkit.command.CommandSender;%0A%0A@CommandInfo(%0A        parent=%22arena%22,%0A        command=%22drops-cleanup%22,%0A        staticParams=%7B%22off%7Cbefore%7Cafter=%22%7D,%0A        description=%22Set or view the item drops cleanup behaviour in your selected arena.%22,%0A%0A        paramDescriptions = %7B%0A                %22behaviour= The item drop behaviour.%22%7D)%0A%0Apublic class DropsCleanupSubCommand extends AbstractPVCommand implements IExecutableCommand %7B%0A%0A    @Localizable%0A    static final String _SET_BEHAVIOUR =%0A            %22Item drops cleanup behaviour in arena '%7B0: arena name%7D' has been set to %7B1: behaviour%7D.%22;%0A%0A    @Localizable static final String _VIEW_BEHAVIOUR =%0A            %22Item drops cleanup behaviour in arena '%7B0: arena name%7D' is %7B1: behaviour%7D.%22;%0A%0A    @Override%0A    public void execute(CommandSender sender, ICommandArguments args) throws CommandException %7B%0A%0A        IArena arena = getSelectedArena(sender, ArenaReturned.getInfoToggled(args, %22off%7Cbefore%7Cafter%22));%0A        if (arena == null)%0A            return; // finish%0A%0A        if (args.isDefaultValue(%22off%7Cbefore%7Cafter%22)) %7B%0A            tell(sender, Lang.get(_VIEW_BEHAVIOUR,%0A                    arena.getName(), arena.getSettings().getDropsCleanup().name()));%0A        %7D%0A        else %7B%0A            DropsCleanup behaviour = args.getEnum(%22off%7Cbefore%7Cafter%22, DropsCleanup.class);%0A%0A            arena.getSettings().setDropsCleanup(behaviour);%0A%0A            tellSuccess(sender, Lang.get(_SET_BEHAVIOUR, arena.getName(), behaviour));%0A        %7D%0A    %7D%0A%7D%0A%0A

add item drops cleanup feature