mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Major command changes that don't work yet.
This commit is contained in:
@ -30,6 +30,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@ -60,6 +61,7 @@ import java.util.Set;
|
||||
* @param <T> command sender class
|
||||
*/
|
||||
@SuppressWarnings("ProtectedField")
|
||||
@Deprecated
|
||||
public abstract class CommandsManager<T> {
|
||||
|
||||
protected static final Logger logger =
|
||||
@ -253,7 +255,7 @@ public abstract class CommandsManager<T> {
|
||||
* @return true if the command exists
|
||||
*/
|
||||
public boolean hasCommand(String command) {
|
||||
return commands.get(null).containsKey(command.toLowerCase());
|
||||
return commands.get(null).containsKey(command.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -433,7 +435,7 @@ public abstract class CommandsManager<T> {
|
||||
String cmdName = args[level];
|
||||
|
||||
Map<String, Method> map = commands.get(parent);
|
||||
Method method = map.get(cmdName.toLowerCase());
|
||||
Method method = map.get(cmdName.toLowerCase(Locale.ROOT));
|
||||
|
||||
if (method == null) {
|
||||
if (parent == null) { // Root
|
||||
|
@ -1,68 +0,0 @@
|
||||
/*
|
||||
* WorldEdit, a Minecraft world manipulation toolkit
|
||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
||||
* Copyright (C) WorldEdit team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser 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 Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//$Id$
|
||||
|
||||
|
||||
package com.sk89q.minecraft.util.commands;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
|
||||
/**
|
||||
* Indicates how the affected blocks should be hinted at in the log.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Logging {
|
||||
|
||||
enum LogMode {
|
||||
/**
|
||||
* Player position
|
||||
*/
|
||||
POSITION,
|
||||
|
||||
/**
|
||||
* Region selection
|
||||
*/
|
||||
REGION,
|
||||
|
||||
/**
|
||||
* Player orientation and region selection
|
||||
*/
|
||||
ORIENTATION_REGION,
|
||||
|
||||
/**
|
||||
* Either the player position or pos1, depending on the placeAtPos1 flag
|
||||
*/
|
||||
PLACEMENT,
|
||||
|
||||
/**
|
||||
* Log all information available
|
||||
*/
|
||||
ALL
|
||||
}
|
||||
|
||||
/**
|
||||
* Log mode.
|
||||
*
|
||||
* @return either POSITION, REGION, ORIENTATION_REGION, PLACEMENT or ALL
|
||||
*/
|
||||
LogMode value();
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* WorldEdit, a Minecraft world manipulation toolkit
|
||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
||||
* Copyright (C) WorldEdit team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser 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 Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* This package contains the old command system. It is no longer in use. Please switch
|
||||
* to Piston, Intake, ACF, or similar systems.
|
||||
*/
|
||||
package com.sk89q.minecraft.util.commands;
|
Reference in New Issue
Block a user