Commands Issue

Started by NightOwlKOJ on Wed, 08/03/2016 - 22:00

Topic category: Bugs and solutions

Last seen on 07:53, 25. Feb 2018
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Commands Issue
Wed, 08/03/2016 - 22:45 (edited)

It appears that the mod maker is issuing commands in such a way that it isn't recognized by a Cauldron server as an actual command the server can use.  It notifies the user of an unrecognized command, and fails to execute the command.  Is there some way to issue bukkit plugin commands using a mod from the mod maker?

 

 

 

In particular the commands I'm attempting the have certain items issue are as follows:

I've entered them into the command field without a slash as instructed.

/fireball

/enderchest

/effect

/heal

I'm also attempting to have the mod issue commands from the NPC mod Noppes Custom NPC's

The commands I'm attempting to use are:

/noppes faction 55 subtract 100  (To remove 100 points for using certain commands that a faction doesn't like)

/noppes clone spawn Spectre (To spawn a ghost near the player)

/noppes slay mobs 15 (To slay all hostile mobs around a player within 15 blocks)

/noppes freezenpcs true (To freeze all NPC's)

/noppes freezenpcs false

 

 

 

NOTE:  I tried the solution at the end of this page: https://mcreator.pylo.co/forum/10980/gui-button-doesnt-work-execute-com…

That solution did not work...

 

 

Here's an example of the source code of the item if it helps at all.

static{
block = (new ItemscrollOfDimensionalStorage(461));
Item.itemRegistry.addObject(461, "ScrollOfDimensionalStorage", block);

}

static class ItemscrollOfDimensionalStorage extends Item{

public ItemscrollOfDimensionalStorage(int par1){
setMaxDamage(0);
maxStackSize = 1;
setUnlocalizedName("ScrollOfDimensionalStorage");
setTextureName("Scroll");
setCreativeTab(CreativeTabs.tabBlock);
}
public int getItemEnchantability()
{
    return 0;
}
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
    return 0;
}
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
{
    return 1.0F;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entity){
float var4 = 1.0F;
int i = (int)(entity.prevPosX + (entity.posX - entity.prevPosX) * (double)var4);
int j = (int)(entity.prevPosY + (entity.posY - entity.prevPosY) * (double)var4 + 1.62D - (double)entity.yOffset);
int k = (int)(entity.prevPosZ + (entity.posZ - entity.prevPosZ) * (double)var4);

if(true){
if(entity instanceof EntityPlayer){MinecraftServer minecraftserver = MinecraftServer.getServer();if(minecraftserver!=null)minecraftserver.getCommandManager().executeCommand((EntityPlayer)entity, "enderchest");}
}

return itemstack;
}

 

Edited by NightOwlKOJ on Wed, 08/03/2016 - 22:45
Last seen on 14:35, 27. Jun 2019
Joined Dec 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
so you are saying that your
Thu, 08/04/2016 - 02:01

so you are saying that your mod works fine (and the commands work in single player) but your server doesn't register them. tell me if i am wrong

Last seen on 07:53, 25. Feb 2018
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
I haven't even tried it in
Thu, 08/04/2016 - 02:03

I haven't even tried it in single player...  I would try, but I just removed all the comands and I'm instead going to use some plugins to just bind commands to the items since they're all unique...

Last seen on 14:35, 27. Jun 2019
Joined Dec 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
that should work, personally
Thu, 08/04/2016 - 02:05

that should work, personally i don't think mods should use commands (in most cases) an making a command in a plugin takes only a few minutes