Package noppes.npcs.api.block
Interface IBlockScripted
- All Superinterfaces:
IBlock
-
Method Summary
Modifier and TypeMethodDescriptionexecuteCommand
(String command) On servers the enable-command-block option in the server.properties needs to be set to true
Use /gamerule commandBlockOutput false/true to turn off/on command block feedback
Setting NpcUseOpCommands to true in the CustomNPCs.cfg should allow the npc to run op commands, be warned this could be a major security risk, use at own risk
For permission plugins the commands are run under uuid:c9c843f8-4cb1-4c82-aa61-e264291b7bd6 and name:[customnpcs]float
boolean
boolean
int
getLight()
getModel()
int
float
int
int
int
float
float
float
void
setHardness
(float hardness) void
setIsLadder
(boolean enabled) void
setIsPassible
(boolean bo) void
setLight
(int value) void
void
setModel
(IItemStack item) void
setRedstonePower
(int strength) void
setResistance
(float resistance) void
setRotation
(int x, int y, int z) void
setScale
(float x, float y, float z) void
Fires trigger event for block scriptsMethods inherited from interface noppes.npcs.api.block.IBlock
blockEvent, getBlockEntityNBT, getContainer, getDisplayName, getMCBlock, getMCBlockState, getMCTileEntity, getName, getPos, getProperties, getProperty, getStoreddata, getTempdata, getWorld, getX, getY, getZ, hasTileEntity, interact, isAir, isContainer, isRemoved, remove, setBlock, setBlock, setProperty, setTileEntityNBT
-
Method Details
-
setModel
- Parameters:
item
- The item to be set as model
-
setModel
-
getModel
IItemStack getModel() -
getTimers
ITimers getTimers() -
setRedstonePower
void setRedstonePower(int strength) - Parameters:
strength
- Sets the strength of the redstone signal (0-15)
-
getRedstonePower
int getRedstonePower()- Returns:
- Returns the current redstone power (0-15) this block is giving off
-
setIsLadder
void setIsLadder(boolean enabled) -
getIsLadder
boolean getIsLadder() -
setLight
void setLight(int value) - Parameters:
value
- Sets the light value (0-15)
-
getLight
int getLight()- Returns:
- Returns the light value (0-15)
-
setScale
void setScale(float x, float y, float z) - Parameters:
x
- Scale x (0-10)y
- Scale y (0-10)z
- Scale z (0-10)
-
getScaleX
float getScaleX() -
getScaleY
float getScaleY() -
getScaleZ
float getScaleZ() -
setRotation
void setRotation(int x, int y, int z) - Parameters:
x
- Rotation x (0-359)y
- Rotation y (0-359)z
- Rotation z (0-359)
-
getRotationX
int getRotationX() -
getRotationY
int getRotationY() -
getRotationZ
int getRotationZ() -
executeCommand
On servers the enable-command-block option in the server.properties needs to be set to true
Use /gamerule commandBlockOutput false/true to turn off/on command block feedback
Setting NpcUseOpCommands to true in the CustomNPCs.cfg should allow the npc to run op commands, be warned this could be a major security risk, use at own risk
For permission plugins the commands are run under uuid:c9c843f8-4cb1-4c82-aa61-e264291b7bd6 and name:[customnpcs]- Parameters:
command
- The command to be executed- Returns:
- Returns the commands output
-
getIsPassible
boolean getIsPassible() -
setIsPassible
void setIsPassible(boolean bo) -
getHardness
float getHardness()- Returns:
- Harvesting hardness (-1 makes it unharvestable)
-
setHardness
void setHardness(float hardness) -
getResistance
float getResistance()- Returns:
- Explosion resistance (-1 makes it unexplodable)
-
setResistance
void setResistance(float resistance) -
getTextPlane
ITextPlane getTextPlane() -
getTextPlane2
ITextPlane getTextPlane2() -
getTextPlane3
ITextPlane getTextPlane3() -
getTextPlane4
ITextPlane getTextPlane4() -
getTextPlane5
ITextPlane getTextPlane5() -
getTextPlane6
ITextPlane getTextPlane6() -
trigger
Fires trigger event for block scripts- Parameters:
id
- , Id for the eventarguments
- , arguments you can give with it
-