
BenPlaysMC
Members-
Posts
16 -
Joined
-
Last visited
Everything posted by BenPlaysMC
-
I only need the client to know about it, but are there any examples of the code? That would be great.
-
Hi, on command, I would love it so that it would open up a GUI. Specifically a 27 slot normal small chest inventory. I can't seem to find any tutorials on it because they're all custom gui's where I only want a normal inventory.
-
Alright, I fixed the issue. Here's my final class. package com.reprevise.enhanmod.cmds; import com.reprevise.enhanmod.chat.PluginAnnouncer; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; public class PunishThing extends CommandBase { @Override public String getName() { // TODO Auto-generated method stub return "punish"; } @Override public String getUsage(ICommandSender sender) { // TODO Auto-generated method stub return "/punish <user>"; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (sender instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) sender; PluginAnnouncer.sendMessageToMod("Opening GUI..."); } } @Override public int getRequiredPermissionLevel() { // TODO Auto-generated method stub return super.getRequiredPermissionLevel(); } @Override public boolean checkPermission(MinecraftServer server, ICommandSender sender) { // TODO Auto-generated method stub return super.checkPermission(server, sender); } }
-
package com.reprevise.enhanmod.cmds; import java.util.List; import com.reprevise.enhanmod.chat.PluginAnnouncer; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; import net.minecraftforge.client.IClientCommand; public class PunishCMD extends CommandBase { @Override public String getName() { return "punish"; } @Override public String getUsage(ICommandSender sender) { return "/punish <user>"; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (sender instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) sender; PluginAnnouncer.sendMessageToMod("Opening GUI..."); } } @Override public boolean checkPermission(MinecraftServer server, ICommandSender sender) { return false; } @Override public int getRequiredPermissionLevel() { return 0; } @Override public boolean isUsernameIndex(String[] args, int index) { return false; } } This is my new class, and the only thing I changed was overriding the getRequiredPermissionLevel method which didn't help. I went through the class and there were no other methods that dealt with permissions.
-
So I'm working on a mod and I made a command. When I try and execute the command, it says I don't have permission. Here's the class: package com.reprevise.enhanmod.cmds; import java.util.List; import com.reprevise.enhanmod.chat.PluginAnnouncer; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommand; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; import net.minecraftforge.client.IClientCommand; public class PunishCMD extends CommandBase { @Override public String getName() { return "punish"; } @Override public String getUsage(ICommandSender sender) { return "/punish <user>"; } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (sender instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) sender; PluginAnnouncer.sendMessageToMod("Opening GUI..."); } } @Override public boolean checkPermission(MinecraftServer server, ICommandSender sender) { return false; } @Override public boolean isUsernameIndex(String[] args, int index) { return false; } }
-
I didn't make this modpack! The Owner did.
-
New log:https://gist.github.com/anonymous/5f9bc5a306830610439e
-
I went into my server then into logs and clicked on latest.log is that the log you want?
-
I put the crash report on the New log that I posted:http://pastebin.com/LGBSybYh
-
Do you want a crash report aswell?
-
New log:http://pastebin.com/LGBSybYh
-
Yes I did add it
-
I can update you with the new log.
-
No
-
So I'm running alot of mods on a server, they're updated so they fit 1.7.10 forge! Here's the crash report. Link:http://pastebin.com/tC6WHazQ Crash Report:http://pastebin.com/0Qx5G9zH I would like to fix this ASAP if you guys could help me.