Package net.canarymod.commandsys.commands.warp

Source Code of net.canarymod.commandsys.commands.warp.WarpRemove

package net.canarymod.commandsys.commands.warp;

import net.canarymod.Canary;
import net.canarymod.Translator;
import net.canarymod.chat.Colors;
import net.canarymod.chat.MessageReceiver;
import net.canarymod.commandsys.NativeCommand;
import net.canarymod.warp.Warp;

/**
* Command to remove a warp
*
* @author Chris (damagefilter)
*/
public class WarpRemove implements NativeCommand {
    public void execute(MessageReceiver caller, String[] args) {
        if (Canary.warps().warpExists(args[1])) {
            Warp target = Canary.warps().getWarp(args[1]);
            Canary.warps().removeWarp(target);
            caller.message(Colors.YELLOW + Translator.translateAndFormat("warp removed", target.getName()));
        }
        else {
            caller.notice(Translator.translateAndFormat("warp unknown", args[1]));
        }
    }
}
TOP

Related Classes of net.canarymod.commandsys.commands.warp.WarpRemove

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.