Added //grief
This commit is contained in:
@@ -43,3 +43,10 @@ command deadbush {
|
|||||||
help Does stuff.;
|
help Does stuff.;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command /grief {
|
||||||
|
[empty] {
|
||||||
|
run grief;
|
||||||
|
help Does stuff.;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -37,7 +37,7 @@ import net.nemez.chatapi.click.Message;
|
|||||||
|
|
||||||
@Commands(CommandHolderType.File)
|
@Commands(CommandHolderType.File)
|
||||||
@AutoRegisterListener
|
@AutoRegisterListener
|
||||||
@Version(major = 4, minor = 0, revision = 0, compatible = 4)
|
@Version(major = 4, minor = 0, revision = 1, compatible = 4)
|
||||||
public class Eastereggs implements Module, Listener
|
public class Eastereggs implements Module, Listener
|
||||||
{
|
{
|
||||||
final File prefixFile = new File(Main.plugin.getDataFolder(), "eastereggs/prefix.json"),
|
final File prefixFile = new File(Main.plugin.getDataFolder(), "eastereggs/prefix.json"),
|
||||||
@@ -268,7 +268,7 @@ public class Eastereggs implements Module, Listener
|
|||||||
public HashMap<Enchantment, Integer> parseEnchants(JSONObject prefx, JSONObject itm, JSONObject mod,
|
public HashMap<Enchantment, Integer> parseEnchants(JSONObject prefx, JSONObject itm, JSONObject mod,
|
||||||
JSONObject sufx)
|
JSONObject sufx)
|
||||||
{
|
{
|
||||||
HashMap<Enchantment, Integer> result = new HashMap<Enchantment, Integer>();
|
HashMap<Enchantment, Integer> result = new HashMap<>();
|
||||||
Object raw;
|
Object raw;
|
||||||
if ((raw = sufx.get("ench")) != null)
|
if ((raw = sufx.get("ench")) != null)
|
||||||
{
|
{
|
||||||
@@ -333,6 +333,13 @@ public class Eastereggs implements Module, Listener
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Command(hook = "grief")
|
||||||
|
public boolean grief(CommandSender sender)
|
||||||
|
{
|
||||||
|
((Player) sender).kickPlayer("You have been banned: Attempted grief!");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private static Integer parseInt(String raw)
|
private static Integer parseInt(String raw)
|
||||||
{
|
{
|
||||||
if (raw == null)
|
if (raw == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user