General cleanup
Removing outdated comments Removing outdated annotations Adding new annotations Removing deprecation
This commit is contained in:
@@ -1,23 +1,29 @@
|
||||
package com.redstoner.utils;
|
||||
|
||||
public class CommandException extends Exception {
|
||||
|
||||
public CommandException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public CommandException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CommandException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
|
||||
public CommandException() {
|
||||
}
|
||||
|
||||
public CommandException(String message) {
|
||||
super(message);
|
||||
}
|
||||
public class CommandException extends Exception
|
||||
{
|
||||
private static final long serialVersionUID = -7176634557736106754L;
|
||||
|
||||
public CommandException(String message, Throwable cause)
|
||||
{
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public CommandException(Throwable cause)
|
||||
{
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CommandException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)
|
||||
{
|
||||
super(message, cause, enableSuppression, writableStackTrace);
|
||||
}
|
||||
|
||||
public CommandException()
|
||||
{}
|
||||
|
||||
public CommandException(String message)
|
||||
{
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
package com.redstoner.utils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.SimpleCommandMap;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
|
||||
public class CommandMap {
|
||||
|
||||
public static Map<String, Command> getCommandMap() throws ReflectiveOperationException, ClassCastException {
|
||||
public class CommandMap
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Map<String, Command> getCommandMap() throws ReflectiveOperationException, ClassCastException
|
||||
{
|
||||
Field field = SimplePluginManager.class.getDeclaredField("commandMap");
|
||||
field.setAccessible(true);
|
||||
Object map = field.get(Bukkit.getPluginManager());
|
||||
@@ -18,5 +20,4 @@ public class CommandMap {
|
||||
field.setAccessible(true);
|
||||
return (Map<String, Command>) field.get(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ public class ItemProperties
|
||||
public ItemProperties()
|
||||
{}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public ItemProperties(ItemStack item)
|
||||
{
|
||||
if (item == null)
|
||||
@@ -55,6 +56,7 @@ public class ItemProperties
|
||||
unbreakable = meta.isUnbreakable();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public ItemStack toItemStack()
|
||||
{
|
||||
ItemStack result = new ItemStack(id, amount, data);
|
||||
|
||||
Reference in New Issue
Block a user