mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 03:22:23 +00:00
A Ton of New Permissions!!!!
This commit is contained in:
1 parent
8e0e56dbfd
commit
60079b66bc
21 files changed
+236
-159
No files matched your search
@@ -5,16 +5,20 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.CustomNpcsPermissions;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.constants.EnumGuiType;
|
||||
|
||||
public class ItemNpcCloner extends Item{
|
||||
|
||||
|
||||
public ItemNpcCloner(){
|
||||
maxStackSize = 1;
|
||||
setCreativeTab(CustomItems.tab);
|
||||
@@ -22,8 +26,10 @@ public class ItemNpcCloner extends Item{
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){
|
||||
if(par3World.isRemote)
|
||||
CustomNpcs.proxy.openGui(par4, par5, par6, EnumGuiType.MobSpawner, par2EntityPlayer);
|
||||
if(par3World.isRemote || !CustomNpcsPermissions.Instance.hasPermission(par2EntityPlayer, CustomNpcsPermissions.TOOL_CLONER))
|
||||
return true;
|
||||
|
||||
NoppesUtilServer.setClonerGui((EntityPlayerMP) par2EntityPlayer, par4, par5, par6);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -36,7 +42,7 @@ public class ItemNpcCloner extends Item{
|
||||
public boolean requiresMultipleRenderPasses(){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister){
|
||||
|
||||
Reference in new issue
Block a user