12345678910111213141516171819202122232425262728293031323334353637383940 |
- package me.km.snuviscript;
- import me.km.KajetansMod;
- import me.km.api.GlobalText;
- import me.km.api.Module;
- import me.km.api.ModuleCommand;
- import me.km.permissions.Permissions;
- import net.minecraft.command.ICommandSender;
- import net.minecraft.entity.player.EntityPlayer;
- public class CommandQuestInfo extends ModuleCommand
- {
- public CommandQuestInfo(Module m)
- {
- super("questinfo", m);
- super.setDescription("Gibt dir Information über deine Quest");
- super.setUsage("/questinfo");
- super.setPermission(Permissions.QUESTINFO);
- }
- @Override
- public boolean execute(ICommandSender cs, String[] arg)
- {
- if(!(cs instanceof EntityPlayer))
- {
- this.getModule().send(cs, GlobalText.onlyPlayer());
- return true;
- }
- EntityPlayer p = (EntityPlayer) cs;
- Script data = KajetansMod.scripts.getQuestData(p);
- if(data == null)
- {
- this.getModule().send(cs, "Du hast gerade keine Quest.");
- return true;
- }
- this.getModule().send(cs, data.getInfo());
- return true;
- }
- }
|