BlockScripts (Your own events)
This mod allows you to bind BlockScripts to blocks, with which you can do numerous things! BUKKIT_1.4.2-R0.1
Latest Version: BlockScripts V1.4.2
- lots of new Options
- minecraft version 1.4.2!
Hello I'm Shellofchaos and this is the first mod im uploading to bukkitdev, this mod is also still in beta stage and will be expanded.
What does it contain:
- The ability to teleport between multiple blocks randomly or in order and with more options!
- The ability to spawn any mob also randomly or in order.
- The ability to change the block its itemid from multiple itemids also randomly or in order.
- The ability to control any of the above actions from an remote block which can also control multiple blocks or a whole bunch at once.
- The ability to make blocks give an output only once (this will reset on server: reload, shutdown, start up or the special command.
- Blocks can't be destroyed.
What will it contain soon:
blocks spawning items on activation.A command to lookup blocknames.Full permission support (now everything is default op except for using the blocks (clicking destroying and walking over them)).per block permissions and per action permissions
Ability to add commands to blocks.Ability to activate blocks with redstone.A timer script so blocks can activate when the timer has ran out of time.A freeze script which will toggle on block activation.- Good idea's are always welcome.
Recently added
- reseting changed blocks; /setoption [blockname] setreset [time in seconds]
- cooldown for block activating /setoption [blockname] setcooldown [time in sec]
- keys for activating blocks /setoptiong [blockname] setkey [itemid for key]
- Broadcasting /setthen [blockname] broadcast
- setlist [blockname] [message you want]
- Redstone activation /setif [blockname] onpower
- Add timers to blocks /settimer [blockname] [timeinseconds] [true(will repeat)/false(will not repeat)]
- Adding and activating commands with blocks.
- item spawning from blocks
- setting an blocks health (amount of actions needed before activating.)
Permissions
BlockScripts.set.timer = /settimer [blockname] [time]
BlockScripts.get.name = /blockname
BlockScripts.create.break = /setbreak [blockname] [false/true]
BlockScripts.create.option = /setoption [blockname] [option] [true/false]
BlockScripts.create.list = /setlist [blockname] [list]
BlockScripts.create.event = /setthen [blockname] [teleport/spawnmob/changeblock/activateblock/docommand/spawnitem/freezeplayer]
BlockScripts.create.if = /setif [blockname] [onhit/onwalkover/ondestroy/onpower]
BlockScripts.create.delete = /delblock [blockname]
BlockScripts.create.add = /addblock [blockname]
BlockScripts.do.onwalkover
BlockScripts.do.onhit
BlockScripts.do.ondestroy
BlockScripts.use.spawnitem
BlockScripts.use.spawnmob
BlockScripts.use.changeblock
BlockScripts.use.activateblock
BlockScripts.use.teleport
BlockScripts.use.docommand
BlockScripts.use.freezeplayer
Commands:
- /addblock [blockname]
- /delblock [blockname]
- /setif [blockname] [onhit/onwalkover/ondestroy/onpower]
- /setthen [blockname] [teleport/spawnmob/changeblock/activateblock/docommand/spawnitem]
- /setlist [blockname] [list]
- /setoption [blockname] [option] [true/false]
- /setbreak [blockname] [true/false]
- /reloadblock [blockname]
- /blockname
- /sethealth [blockname] [health]
/addblock [blockname] *look at a block and execute this command* the block doesn't do anything yet example: /addblock test1
/setif [blockname] [onhit/onwalkover/ondestroy] *set what the block will react to.* the block still doesn't do anything yet example /setif test1 onwalkover
/setthen [blockname] [teleport/spawnmob/changeblock/activateblock/docommand] *will set the action for a block after one of the above actions has been "acted"* example /setthen test1 teleport
/setlist [blockname] [list] *now you can insert a row of names or item ids in the [list] part.*
if your block has teleport ((/setthen [blockname] teleport)) then set the names of blocks to teleport too. example /setlist test1 blockname2 blockname3
if your block has spawnmob ((/setthen [blockname] spawnmob)) then set the names of mobs to spawn. example /setlist test1 cow creeper sheep
if your block has changeblock ((/setthen [blockname] changeblock)) then set the itemids for the block to change too. example /setlist test1 1 69 4
if your block has activateblock ((/setthen [blockname] activateblock)) then set the names of the blocks to activate. example /setlist test1 blockname1 blockname2
if your block has docommand ((/setthen [blockname] docommand)) then set the command to activate. (you can only have one command for each block) example /setlist test1 blockname1 blockname2
/setoption [blockname] [option] [true/false] *if posible will set the the option true/false for the given block*
- /setoption [blockname] random [true/false] *Will pick an random item from the list and use it as output*
- /setoption [blockname] once [true/false] *Will only pick every item on the list once* can be reset with /reloadblock [blockname]
- /setoption [blockname] all [true/false] *Will pick all the items from the list and use them as output* *do NOT! use this for teleport script!!!(results in lag)((will be given an fix soon))*
/setbreak [blockname] [true/false] *Set if an block can be broken.The Blockscript will stay at the location so just replace the block to activate it again*
Example usages.
- you can create semi random spawnpoints for your world/arena
- you can make it generate waves of mobs for arenas
- make hidden-entrances/retracting bridges by changing blocks
- make spawnpoints for you hungergames/skyblock map so everyone get their own spawn/island
- make portals between places/worlds
- delay everything or repeat it with the help of timers.
- any thing you think off with teleportation/mobspawning/blockchanging
Installation
to install download the BlockScript.jar and put it in your plugins folder.
Hey shellofchaos,
can i set a block-destroy counter and a timer for block-destroy?
I will make a block timer for players, if they break 32blocks. After 1 Day they can continue destroying 32blocks.
So like: Monday, players can destroy 32 diamond-ore. Then they must wait to Tuesday Tuesday then, they can continue destroy 32 diamond-ore.
Does block health work? Because i tried using it and it crashed the server
@HammerfeIl
in the config file is there and option "once: true"?? if so replace true with false
else ingame do /reloadblock [blockname]
Ok so I'm trying to setup the teleport event and it just tells me that "there is no more block left" I setup everything the way it says to on this page. I've also looked at the config file to confirm that that blocks are listed for the teleport desinations. Is there something that I'm missing or what?
@willkiller1234
If the list for the block is empty.
What does it mean when it says there is no more block left?
@Haydenw3377
This seems to be an bukkit issue
thanks, seems to have done the trick, although i tried spawning in skeletons but they don't have bows and don't seem to attack anything???
@Haydenw3377
http://dev.bukkit.org/media/files/644/966/BlockScripts.jar V1.4.5
@Haydenw3377
I know i should make an updated list but being in university and these weeks are exam weak are a bit busy and all so thats sheduled next week.
hmm i noticed the reset doesnt stop an blocks timer that is fixed now. but the new patter you use is: block a /addblock /setif /setthen [blockname] activateblock /setlist [blockname] blockb
block b /addblock /setthen [blockname] spawnmob /setoption [blockname] timer []time in sec] true /setoption [blockname] reset [time in sec]
link to new build will be here in a min:
Hi, on the server i'm working on we're trying to use your plug-in to create instances and we're having trouble sorting out which commands to use to do certain things. eg; we want block A to activate block B. having set up A correctly we go to start setting up B, but which /setif command should we use in this case? also, we want the blocks to spawnmobs for us, but multiple times. we trialled using the timer option and the reset option but since we had to use the same block to do the spawning and the registering of player presence, the mobs were causing an unstoppable wave of spawns... I was wondering if you knew the sequence of commands we ought to be using? Also, I've seen that some of the recent additions aren't in the same location on your post as the original ones so could you write up a complete list of commands and options please?
Thanks, we really want this to work out for us, as we feel that using commandblocks will be a bit immersion breaking...
@HammerfeIl
actually i was think of adding it but since im in exam week im only doing fixes for a bit.
Hey are you going an option to set a price for using the signs. I know you would need vault but I think it would be a nice addon.
I guess so. I'm going to try it out. thanks
@HammerfeIl
you mean the /setoption [blockname] noperm true ?
Sorry for the two messages but can you make it so when you hit a block to activate a command it would be run through console instead of through the player?
Thanks for the fix everything seems to work great now. :D
@HammerfeIl
Haha sorry i for got to remove an debug message which obviously gives an error message since it is directed towards my player :) fixed build http://dev.bukkit.org/media/files/644/727/BlockScripts.jar
Hey shellofchaos I'm getting this error for your latest build. (aka the one you have in the comments below) I'm running the latest beta build for craftbukkit as well. This error came up when I tried using a block with a docomand script. These are the commands I did in order if it helps.
2012-11-04 10:49:31 [SEVERE] Could not pass event BlockDamageEvent to BlockScripts v1.4.4 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:341) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockDamageEvent(CraftEventFactory.java:213) at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:163) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:549) at net.minecraft.server.Packet14BlockDig.handle(SourceFile:46) at net.minecraft.server.NetworkManager.b(NetworkManager.java:282) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:111) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:578) at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:495) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:428) at net.minecraft.server.ThreadServerApplication.run(SourceFile:818) Caused by: java.lang.NullPointerException at com.gmail.maicospiering.BlockScripts.Blocker.getBlocklist(Blocker.java:560) at com.gmail.maicospiering.BlockScripts.actionManager.doAction(actionManager.java:156) at com.gmail.maicospiering.BlockScripts.myPlayerListener.onTouch(myPlayerListener.java:86) at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:339) ... 16 more
@noraver
Hello, ive found the issue i made a mistake when loading the command but the new build has it fixed.
http://dev.bukkit.org/media/files/644/683/BlockScripts.jar