Merge pull request #1219 from Lunatrius/master
Prevent client only commands from bleeding through to the server.
This commit is contained in:
commit
6da8a19094
2 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
public void func_146403_a(String p_146403_1_)
|
||||
{
|
||||
this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_146403_1_);
|
||||
+ if (net.minecraftforge.client.ClientCommandHandler.instance.func_71556_a(field_146297_k.field_71439_g, p_146403_1_) == 1) return;
|
||||
+ if (net.minecraftforge.client.ClientCommandHandler.instance.func_71556_a(field_146297_k.field_71439_g, p_146403_1_) != 0) return;
|
||||
this.field_146297_k.field_71439_g.func_71165_d(p_146403_1_);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ public class ClientCommandHandler extends CommandHandler
|
|||
public String[] latestAutoComplete = null;
|
||||
|
||||
/**
|
||||
* @return 1 if successfully executed, 0 if wrong usage, it doesn't exist or
|
||||
* it was canceled.
|
||||
* @return 1 if successfully executed, -1 if no permission or wrong usage,
|
||||
* 0 if it doesn't exist or it was canceled (it's sent to the server)
|
||||
*/
|
||||
@Override
|
||||
public int executeCommand(ICommandSender sender, String message)
|
||||
|
@ -91,7 +91,7 @@ public class ClientCommandHandler extends CommandHandler
|
|||
t.printStackTrace();
|
||||
}
|
||||
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
//Couple of helpers because the mcp names are stupid and long...
|
||||
|
|
Loading…
Reference in a new issue