mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-26 11:07:55 +01:00
Build custom mob list /spawnmob
This commit is contained in:
parent
2b25ca2932
commit
15c0565923
@ -5,9 +5,7 @@ import com.earth2me.essentials.Mob;
|
|||||||
import com.earth2me.essentials.Mob.MobException;
|
import com.earth2me.essentials.Mob.MobException;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
import com.earth2me.essentials.Util;
|
import com.earth2me.essentials.Util;
|
||||||
import java.util.Locale;
|
import java.util.*;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
@ -27,12 +25,13 @@ public class Commandspawnmob extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
if (args.length < 1)
|
if (args.length < 1)
|
||||||
{
|
{
|
||||||
final Set<String> availableList = Mob.getMobList();
|
final Set<String> mobList = Mob.getMobList();
|
||||||
for (String mob : availableList)
|
final Set<String> availableList = new HashSet<String>();
|
||||||
|
for (String mob : mobList)
|
||||||
{
|
{
|
||||||
if (!user.isAuthorized("essentials.spawnmob." + mob.toLowerCase()))
|
if (user.isAuthorized("essentials.spawnmob." + mob.toLowerCase()))
|
||||||
{
|
{
|
||||||
availableList.remove(mob);
|
availableList.add(mob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (availableList.isEmpty())
|
if (availableList.isEmpty())
|
||||||
|
Loading…
Reference in New Issue
Block a user