Package noppes.npcs.api.block
Interface IBlockScripted
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
clearStoredData()
void
clearTempData()
void
executeCommand(java.lang.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
getHardness()
boolean
getIsLadder()
boolean
getIsPassible()
int
getLight()
IItemStack
getModel()
int
getRedstonePower()
float
getResistance()
int
getRotationX()
int
getRotationY()
int
getRotationZ()
float
getScaleX()
float
getScaleY()
float
getScaleZ()
java.lang.Object
getStoredData(java.lang.String key)
java.lang.String[]
getStoredDataKeys()
java.lang.Object
getTempData(java.lang.String key)
java.lang.String[]
getTempDataKeys()
ITextPlane
getTextPlane()
ITextPlane
getTextPlane2()
ITextPlane
getTextPlane3()
ITextPlane
getTextPlane4()
ITextPlane
getTextPlane5()
ITextPlane
getTextPlane6()
ITimers
getTimers()
boolean
hasStoredData(java.lang.String key)
boolean
hasTempData(java.lang.String key)
void
removeStoredData(java.lang.String key)
void
removeTempData(java.lang.String key)
void
setHardness(float hardness)
void
setIsLadder(boolean enabled)
void
setIsPassible(boolean bo)
void
setLight(int value)
void
setModel(java.lang.String name)
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
setStoredData(java.lang.String key, java.lang.Object value)
void
setTempData(java.lang.String key, java.lang.Object value)
-
Methods inherited from interface noppes.npcs.api.IBlock
canCollide, canCollide, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getContainer, getDisplayName, getMCBlock, getMCTileEntity, getName, getPosition, getTileEntity, getTileEntityNBT, getWorld, getX, getY, getZ, hasTileEntity, isAir, isContainer, remove, setBlock, setBlock, setBounds, setPosition, setPosition, setPosition, setPosition, setTileEntity
-
-
-
-
Method Detail
-
setModel
void setModel(IItemStack item)
- Parameters:
item
- The item to be set as model
-
setModel
void setModel(java.lang.String name)
-
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
void executeCommand(java.lang.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]- Parameters:
command
- The command to be executed
-
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()
-
setStoredData
void setStoredData(java.lang.String key, java.lang.Object value)
-
getStoredData
java.lang.Object getStoredData(java.lang.String key)
-
removeStoredData
void removeStoredData(java.lang.String key)
-
hasStoredData
boolean hasStoredData(java.lang.String key)
-
clearStoredData
void clearStoredData()
-
getStoredDataKeys
java.lang.String[] getStoredDataKeys()
-
removeTempData
void removeTempData(java.lang.String key)
-
setTempData
void setTempData(java.lang.String key, java.lang.Object value)
-
hasTempData
boolean hasTempData(java.lang.String key)
-
getTempData
java.lang.Object getTempData(java.lang.String key)
-
clearTempData
void clearTempData()
-
getTempDataKeys
java.lang.String[] getTempDataKeys()
-
-