Cast null instead of creating a new set.
This commit is contained in:
@@ -7,13 +7,12 @@ import com.garbagemule.MobArena.commands.Command;
|
|||||||
import com.garbagemule.MobArena.commands.CommandInfo;
|
import com.garbagemule.MobArena.commands.CommandInfo;
|
||||||
import com.garbagemule.MobArena.commands.Commands;
|
import com.garbagemule.MobArena.commands.Commands;
|
||||||
import com.garbagemule.MobArena.framework.ArenaMaster;
|
import com.garbagemule.MobArena.framework.ArenaMaster;
|
||||||
import com.garbagemule.MobArena.util.config.ConfigUtils;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.Set;
|
||||||
|
|
||||||
import static com.garbagemule.MobArena.util.config.ConfigUtils.setLocation;
|
import static com.garbagemule.MobArena.util.config.ConfigUtils.setLocation;
|
||||||
|
|
||||||
@@ -42,7 +41,7 @@ public class ClassChestCommand implements Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Player p = (Player) sender;
|
Player p = (Player) sender;
|
||||||
Block b = p.getTargetBlock(new HashSet<Material>(), 10);
|
Block b = p.getTargetBlock((Set<Material>) null, 10);
|
||||||
|
|
||||||
switch (b.getType()) {
|
switch (b.getType()) {
|
||||||
case CHEST:
|
case CHEST:
|
||||||
|
|||||||
Reference in New Issue
Block a user