mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 02:34:10 +00:00
Add Universal Developer support to Commands
This commit is contained in:
1 parent
88eb96e784
commit
8d21291e7b
2 files changed
+8
No files matched your search
@@ -6,6 +6,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import kamkeel.developer.Developer;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
@@ -132,6 +133,9 @@ public class CommandKamkeel extends CommandBase{
|
||||
}
|
||||
|
||||
if(sender instanceof EntityPlayer){
|
||||
if(Developer.Universal.contains(((EntityPlayer) sender).getUniqueID())){
|
||||
return true;
|
||||
}
|
||||
return CustomNpcsPermissions.hasCustomPermission((EntityPlayer) sender, getCommandPermission(command.getCommandName()));
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import kamkeel.developer.Developer;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
@@ -140,6 +141,9 @@ public abstract class CommandKamkeelBase extends CommandBase{
|
||||
}
|
||||
|
||||
if(sender instanceof EntityPlayer){
|
||||
if(Developer.Universal.contains(((EntityPlayer) sender).getUniqueID())){
|
||||
return true;
|
||||
}
|
||||
return CustomNpcsPermissions.hasCustomPermission((EntityPlayer) sender, getSubCommandPermission(subCommand));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user