mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 21:32:19 +00:00
Item Use Fix on other Items
This commit is contained in:
1 parent
d818e466d0
commit
cc38f9addf
2 files changed
+15
-13
No files matched your search
@@ -42,9 +42,10 @@ public class ItemNpcWand extends Item{
|
||||
public boolean onItemUse(ItemStack par1ItemStack, final EntityPlayer player, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
{
|
||||
if(par3World.isRemote)
|
||||
return true;
|
||||
return false;
|
||||
if(ConfigMain.OpsOnly && !MinecraftServer.getServer().getConfigurationManager().func_152596_g(player.getGameProfile())){
|
||||
player.addChatMessage(new ChatComponentTranslation("availability.permission"));
|
||||
return false;
|
||||
}
|
||||
else if(CustomNpcsPermissions.hasPermission(player, CustomNpcsPermissions.NPC_CREATE)){
|
||||
EntityCustomNpc npc = new EntityCustomNpc(par3World);
|
||||
@@ -56,10 +57,11 @@ public class ItemNpcWand extends Item{
|
||||
npc.setHealth(npc.getMaxHealth());
|
||||
|
||||
NoppesUtilServer.sendOpenGuiNoDelay(player, EnumGuiType.MainMenuDisplay,npc);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
player.addChatMessage(new ChatComponentTranslation("availability.permission"));
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user