Update to APIv4. I hope this no borke git.

This commit is contained in:
Pepich
2017-09-17 15:34:22 +02:00
parent e0fee3b145
commit 77c8fa3fb7
47 changed files with 1248 additions and 989 deletions
+7 -5
View File
@@ -12,14 +12,16 @@ import org.json.simple.JSONObject;
import com.nemez.cmdmgr.Command;
import com.redstoner.annotations.AutoRegisterListener;
import com.redstoner.annotations.Commands;
import com.redstoner.annotations.Version;
import com.redstoner.misc.CommandHolderType;
import com.redstoner.misc.JsonManager;
import com.redstoner.misc.Main;
import com.redstoner.misc.Utils;
import com.redstoner.modules.Module;
@Commands(CommandHolderType.String)
@AutoRegisterListener
@Version(major = 2, minor = 0, revision = 1, compatible = 2)
@Version(major = 4, minor = 0, revision = 0, compatible = 4)
public class Abot implements Module, Listener
{
private File answerFile = new File(Main.plugin.getDataFolder(), "abot.json");
@@ -40,7 +42,7 @@ public class Abot implements Module, Listener
if (hideperm == null || !event.getPlayer().hasPermission((String) hideperm))
{
event.setCancelled(true);
Utils.sendMessage(event.getPlayer(), null, (String) entry.get("message"), '&');
getLogger().message(event.getPlayer(), (String) entry.get("message"));
return;
}
}
@@ -54,7 +56,7 @@ public class Abot implements Module, Listener
answers = JsonManager.getArray(answerFile);
if (answers == null)
answers = new JSONArray();
Utils.sendMessage(sender, null, "Loaded the abot.json file!");
getLogger().message(sender, "Loaded the abot.json file!");
}
@Override
@@ -70,7 +72,7 @@ public class Abot implements Module, Listener
{
return "command abot {\n" +
" reload {" +
" help Reloads answes from the .json file.;\n" +
" help Reloads answers from the .json file.;\n" +
" run abot_reload;\n" +
" perm utils.abot.reload;" +
" }\n" +