It requires you to have operator rights on the server, and it involves command blocks. Give yourself a command block by typing the command
/give your_name command_block, and place it somewhere in the center of the area you don't want being griefed. I usually will hide it just below the ground, or in a small hidden-away room in the middle of a building or something. Right-click it, and enter this command:
effect @a[m=0,r=36] 4 2 5 trueWhen activated, this command will apply a status effect to all Survival Mode players (
m=0), within a radius of 36 blocks from the command block (
r=36). The effect will be Mining Fatigue (effect ID
5, which will last for
2seconds. The word "true" at the end will hide the particle effects (supported in Minecraft 1.8+; for older versions, remove the word "true" from the command). See Status effect on the Minecraft wiki for details.
Mining Fatigue slows down the player's mining speed by 20% per level, so at level 5 your speed is slowed by 100%. What this basically means is that nobody can break anything while under Mining Fatigue 5. You can't even break a dandelion using a diamond axe. It makes the area completely grief-proof.
Adjust the radius to however large you think you'll need to cover the entire area you want protected. If the area is very large (i.e. so that the command block might end up being unloaded from memory when its chunk goes away), you'll need multiple command blocks positioned around the area to make sure the Mining Fatigue is still in effect.
Anyway, now you just need to hook up the command block to a redstone clock so that it's triggered repeatedly. My favorite is to just use a hopper clock. A comparator clock has too fast of a pulse and the command block will never be executed.
With a hopper clock, just place two hoppers that connect to each other. For example, place a normal block like stone, and then with a hopper, right-click on the side of the stone block so the bottom of the hopper connects to the side. Remove the stone block, go to the side where it used to be, and hold down Shift and right-click the hopper to attach the second one.
Edit for 1.8: It seems the timing has been changed in hoppers on Minecraft 1.8, and a two-hopper clock is "too fast" and won't trigger the command block repeatedly (it will trigger it one time and then never again). Instead of using 2 hoppers that feed into each other, you can use 4 hoppers that feed in a circle, each one connecting to the next one. This slows down the rate that the command block gets executed by 50% but it still works in Minecraft 1.8.
Put a single item into one of the hoppers. If it worked, the item should disappear from the hopper's GUI and then reappear shortly after; the item is being passed back and forth between the hoppers. Now, pick one hopper and put a comparator and then a repeater next to it. Whenever this hopper has the item, the comparator will get a signal and the repeater will amplify it. And there you go. Here's a screenshot of the full setup:
What about creepers and endermen?
Even if you prevent players from destroying blocks manually, they could still lure a creeper in and cause it to explode and damage the nearby blocks. In Minecraft 1.8+ you can select entities by type using command blocks, so you may wanna add some more command blocks to killl any creepers or endermen that get too close (the endermen are optional, but if your build involves a lot of natural blocks like dirt and sand you may wanna keep them away too):
You may also be able to do the same for the `PrimedTnt` entity but that may be trickier considering the speed at which TNT can be launched. You'd need a particularly fast redstone clock to keep up.
There are 67 comments on this page. Add yours.
Thank you for this very helpful and informative article. I used this method in a mob arena on a personal server (Only 2 to 3 people) and it works phenomenally. Keep up the good work, kirsle.
I am trying this on a 1.7.10 server and cannot seem to to get it to work.
I have your hopper clock working, but I cannot get the effect to work.
I also want it to apply to everyone, but the owner of the building.
Should this work?
/effect @a[r=15,m=0][name=!PLAYERNAME] 4 3 5
Where PLAYERNAME is the owner of the building.
To make sure the command block is working, just put a button on it and push it. If a redstone clock is too fast (i.e. so the redstone signal stays lit constantly) it won't keep reactivating the command block, so if that's the case, fix your clock. ;)
I don't think you can select players by name, however you could set up scoreboard teams for each player (if you aren't already using teams for something else on your server), i.e. where
$TEAM_NAME are the same value:
/scoreboard teams add $USERNAME /scoreboard teams join $TEAM_NAME $USERNAME
Then your command block could do,
/effect @a[r=15,m=0,team=!USERNAME] 4 3 5
If you are already using teams for something else, you can accomplish the same with objectives.
/scoreboard objectives add $USERNAME dummy /scoreboard players set $USERNAME $USERNAME 1
Then the username (i.e.
caskir) would have a
caskir score set to 1, and repeat for all users you want to set up anti-griefing areas for.
Then the command block (untested, might work, if not try
/effect @a[r=15,m=0,score_$USERNAME=!1] 4 3 5
"/effect @a[r=15,m=0] 4 60 5" should work, replace the 60 with however long you want the effect to last. To stop the owner from getting the effect, do "/effect OWNER 4 0" 1 tick later (repeater right after)
This was VERY helpful.
I've built a large (biome scale!) labyrinth and was looking for a way in vanilla to prevent digging besides bedrock.
I'm using a slow hopper clock with a long effect time.
i.e. 40 second pulse (6 bones in one hopper set and about 50 in the other) /effect @a[r=80] 4 240 5
I started with r=36 but realized it probably has less load with one large area and one clock instead of smaller areas and many more clocks.
I also send flavor messages from a linked command block about feeling weary.
something like. /msg @a[r=80] You feel weary.
Thanks! This was AWESOME.
This was very helpful! Thank you :) We are building a rather large spawn city in our server, a place where players can hang around. The downside is that we get console spammed by the command block messages :(
To cut back on command block spam:
/gamerule commandBlockOutput falsewill hide command block output in-game
/gamerule logAdminCommands falsewill hide command block output in the server console. It will also hide other admin commands (i.e. when a user changes their own game mode, etc.) though.
Thank you so much! It worked :D Command Blocks are very new to us. We have used plugins for everything until this last update. It's been exciting learning more about what we can do with them. Again, thanks for your help and fast reply :)
Thanks kirsle, that is really useful :)
I used the co-ordinates to define the area rather than radius, and as myself and Ladyhawk are 'mods' we are the only people in a team, so:
/effect @a[x=100,y=40,z=100,dx=100,dy=70,dz=100,team=] 4 3 5
sets a 100x70x100 box starting at 100,40,100 and anyone not in a team gets the mining fatigue. And now we don't get spammed with people going afk at spawn :P
For the tnt issue you can set up a fill clock which runs really quick of command blocks and redstone blocks, you'll have to google it though as i've only heard of it.
Is there a way to establish this for specific dwellings and then add owners?
I have a server with a group of kids/new crafters. I'm trying to generate a solution much like what bukkit offers through WorldEdit / WorldGuard, without modding Vanilla.
These kids are so new they unintentionally break stuff all the time. I want to give each of them an area that is theirs to craft, but is protected from all other players. Eventually, I'll also create community areas and protect them from all players, but first, I need to help the players protect their dwellings from each other.
server.properties) which will prevent players from creating/destroying blocks in general except in their designated areas.
Assuming each person gets a large area (several chunks big), it'd probably be a good idea to keep the command blocks that enforce the game modes within the spawn chunks of the server. Use a compass and go to the spot that the compass points to, to find the center of the spawn region.
The 5x5 chunk radius (about 80x80 blocks) around the spawn point is always loaded in memory, so redstone circuits will always run here even if nobody is around. You can dig out a "bunker" underground to put all your command blocks and redstone clocks.
Command blocks can't select players by name (afaik), but it can select them by team. So you can create one team for each player and assign them to it with these commands:
/scoreboard teams add <team_name>
/scoreboard teams join <team_name> <player_name>
So for example to make a team named "caskir" for the player named "caskir":
/scoreboard teams add caskir
/scoreboard teams join caskir caskir
As a bonus, you can assign a color to a team, and the players will have their name appear in that color (both above their head and in the player list when you hit Tab), example,
/scoreboard teams option <team_name> color light_purple - more info on the Scoreboard wiki
For each area you want to assign to a person, use some command blocks along these lines (I'm using the team/player name caskir in these examples):
/gamemode 1 @a[team=caskir,r=60,x=123,y=60,z=123]
/gamemode 2 @a[team=caskir,r=80,rm=60,x=123,y=60,z=123]
The first command will set the player into Creative Mode when they're within 60 blocks of the coordinates 123,60,123 (you'd have to find and write down the X/Y/Z coordinates of the center of each area in advance). The second command will set the player's game mode to Adventure when they're at least 60 blocks away from that coordinate (actually, within a ring that's between 60 and 80 blocks away).
So when they approach their area they're put into Creative and when they leave they're put into Adventure.
To allow multiple people to share the same creative area, just add extra command blocks that do the same commands but with the other person's team.
The command block that puts them into Adventure mode uses a "ring shape" radius (minimum 60 blocks, maximum 80 in this example), so that you can allow the same player to have creative mode in more than one area as long as the outer perimeters don't overlap. In this example there's a 20 block width zone around the area where they'll be switched to adventure mode (if they're not already) when leaving the area. Note that if they teleport out or use a Nether Portal to leave their creative mode area, it will be more difficult to manage their game mode (you may want to disable the nether on your server, or restrict players from being able to hold a Flint & Steel so they can't light their own portals).
Remove nether portal ingredients from player inventories:
/clear @a flint_and_steel
/clear @a obsidian
/clear @a lava_bucket
Removing just the Flint & Steel and Obsidian isn't necessarily enough, cuz a crafty player could build the portal by molding it (make a frame out of dirt, fill with lava, pour water over...) and then light the portal by using wood planks and lava so they catch fire and eventually spread to light the portal. ;)
The kids are building their world, I am not. I don't think they'd be very happy with me if I stripped them of their ability to create their world as they see fit. ;)
I just want to give them a way to protect their own dwelling from others who have no clue what they're doing and just mash stuff.
If everyone has creative mode, there's nothing you can really do in vanilla Minecraft to prevent people from messing with each other's stuff.
The only way to prevent blocks from being changed is by putting players in Adventure Mode, or using Survival Mode w/ the Mining Fatigue 5 effect.
They might be able to flip it backwards, have everyone with Creative Mode by default and switch them into Adventure when entering an area they don't "own", i.e.
/gamemode 2 @a[team=!caskir,...] would select all players who aren't on that team. If the players all have operator rights though, they can switch their own teams around and get past any such restrictions.
Maybe just take regular world backups and tell everyone to play nice. If somebody does blow up the world, restore from a backup.
They're 6, 7, and 8 year olds...
I saw this vid and wonder if I could (what you're saying above) just somehow visit each player's "home" (there are about 20 so far) and set it so that only that player can mod within the radius. I am happy to use a flip to Adventure, or even tp them back out, but the kids like showing each other what they build, they just don't like the bull in the china shop syndrome.
I'm not well versed in the syntax, however, and don't know how to set exemptions. I'd be happy with protecting each of their dwellings as the OP and exempting just that particular player for that zone. Is this possible? If so, what's the command syntax please.
That video's doing basically the same thing we've been talking about. Switches players into Adventure Mode and applies Mining Fatigue + Haste when they get close to the building, and puts them back in Survival when they leave.
If you're the only OP on the server, some other ideas:
The device could just be a couple command blocks with buttons attached, with commands like:
/gamemode 1 @a[name=whatever]
/gamemode 0 @a[name=whatever]
Alternatively, you can have creative mode be switched on by default for the owner whenever they enter their area, and turned off when they leave. In that case, these are all the commands you'd need for each area:
gamemode 2 @a[name=!owner,r=60,x=123,y=60,z=123]
gamemode 0 @a[name=!owner,r=80,rm=60,x=123,y=60,z=123]
gamemode 1 @a[name=owner,r=60,x=123,y=60,z=123]
gamemode 0 @a[name=owner,r=80,rm=60,x=123,y=60,z=123]
If using a game mode toggle device for the area's owners (instead of automatic creative mode), you'd just want a command block to set them back to survival in case they leave their area so they can't take their creative mode with them:
gamemode 0 @a[name=owner,r=80,rm=60,x=123,y=60,z=123]
Will these suggestions work if I substitute Creative for Survival... So, I make it so that all but the owner of the area are switched to adventure while within the radius, and then when they depart, they're flipped back to creative.
I've tested the Adventure mode and, for the current skill levels anyway, if it doesn't prevent harm, it will deter effectively.
Most of the crafters are brand new, only a few can really read, and they're just playing/building.
It should work if the default game mode is creative too.
If they're flying really high in creative and enter somebody else's area though, they'll fall to their doom when they get switched to adventure. ;)
That part could probably be mitigated by giving effect buffs to adventure mode players (this could be centralized at the world spawn point to universally apply to adventure mode players)
/effect @a[m=2] 11 2 5 true
This would give adventure mode players Resistance V (Resistance reduces damage taken by 20% per level, so at level 5+ it makes them completely invincible except for the
/kill command or falling into the void) for 2 seconds at a time (a redstone clock can make sure to run the command quickly enough that the 2 seconds won't expire for as long as they stay in adventure mode).
Oh, yes indeed, it does!! Thank you so very much. This is perfect. Instead of Survival, we'll just flip/flop them from C to A and all is wonderful. :)
You have a new, devoted follower. Thank you for your time and assistance.
What is the rm= setting?
It specifies a minimum radius. Target selector arguments
So if you combine
r=20,rm=10) it only targets players between 10 and 20 blocks away. If you use
r, it will target players at least X blocks away but with no maximum radius (if you want people to have multiple areas, don't do this cuz it will conflict with their other areas).
Awesome. Thank you. Really.
Really! I've been fighting with this for three days, trying to keep the kids from wreaking havoc on each other without even realizing it. They're from all over and just having a blast.
Well, ok.. SO, maybe it doesn't work.
If I set the command as you mentioned -
Keeping outsiders under control: Adventure Mode when entering: gamemode 2 @a[name=!owner,r=60,x=123,y=60,z=123]
Survival Mode when exiting: gamemode 0 @a[name=!owner,r=80,rm=60,x=123,y=60,z=123]
If I enter the first command, followed by the second command, everyone suddenly is in Adventure, and they never return to Creative until I change the gamemode for the entire world back to Creative.
What am I missing?
This idea you mentioned (copied below) sounds like what I thought I was doing (minus teams - or with teams, and set all to creative, and yes, I'm the only OP), and exactly what I need, but I (once again) don't know enough yet to know the syntax, or how to implement. Can I just input the commands? Do i have to utilize command blocks?
Good grief.. and I was so sure I had it figure out.
The command blocks are needed for the whole thing to be automatic. You could just type the commands, but it wouldn't be automatic then. ;)
Adventure mode when entering:
gamemode 2 @a[name=!owner,r=60,x=123,y=60,z=123]
Sets gamemode to 2 (adventure) for all players that:
Survival mode when exiting:
gamemode 0 @e[name=!owner,r=80,rm=60,x=123,y=60,z=123]
Sets gamemode to 0 (Survival) for all players that:
So, assuming a given player (not "owner") is far away from 123,60,123 when the command blocks start running (say they're at coordinate 700,60,700), nothing would happen to them each time the command block runs.
As they walk closer to 123,60,123 (the center of the affected area of the command blocks)...
So the main thing is to make sure the X, Y and Z coordinates are right. You can hit F3 to open the debug screen and see the coordinates of where your character is currently standing. I've just been using 123,60,123 as an example (Y=60 is about the average surface height in a Minecraft world).
Ok, that makes sense.
Would I be better to use command blocks with hoppers, or some other configuration. And either way, the attempt at it I have already conducted doesn't cause it to run in a loop and I don't know what I'm missing.
Currently, I have tried two command blocks, one set with the "entry" into area and the other, the "exit". I have two hoppers, filled with redstone, and a comparator for each command block. They're touching and in the position I've seen on videos. BUT, it's as if I need another source/clock/mechanism to keep the commands executing.
My kids have started playing Minecraft with friends but one of the friends thinks its really funny to dig the ground out from below them so that they die leading to :'(
Is it possible to apply fatigue to bedrock for example? I can apply fatigue to cows (!!) but can't find the correct syntax/codes for bedrock...any ideas?
I can get the command block to activate to set the player that isn't the owner to adventure when they enter the radius, but when they leave the radius, they don't switch back..
If I can send a screenshot of the command blocks, maybe that would clear it up?
Thanks for any help.
Some other things to try will be to play around with the radii. Maybe the "60 block radius for the inner circle, 60-80 radius for the outer" are too close to each other and they conflict.
One other thing I just thought of, Redstone circuits only work while the chunks they're in are currently loaded by the server (depending on the server render distance I think). So if the area you're protecting is really large and it has its own command blocks inside for managing these things, then it'd be possible that the outer reaches of the area are too far away from the redstone/command blocks and they get unloaded from memory and thus stop working. If that's the case, it'd be better to centralize all the command blocks within the spawn chunks (5x5 chunk area around the center of the world spawn point, which can be found by using the compass).
As for the hopper clock issue, I mentioned in an edit to the original post above that Minecraft 1.8 changed the timing, and a 2-hopper clock is too fast and won't keep activating the command block repeatedly (you can test it by making the command block run a
say command, and see if your chat screen gets spammed by it, or have it do something else equally visible like kill all zombies and then spawn some zombies and see if they get killed immediately, etc.), so in 1.8 you'd want to add more hoppers. I use 4 hoppers that all feed into each other in a circular shape.
The way I have it set up, with levers, if I actively switch the lever it will take the player that isn't the owner, if within the radius, to adventure. However, if I have that player leave the area, then even if I toggle the lever, it doesn't switch them back.. It's like one way yes, the other no, and automatic - not even close.
I have the block configuration setup with just a few blocks from spawn, and the "dwelling" I'm protecting is probably withing 50 blocks of spawn.
Commands currently being used:
gamemode 2 @a[name=!Cccgz,r=10,x=31,y=114,z=-42]
gamemode 1 @a[name=!Cccgz,r=13,rm=10,x=31,y=114,z=-42]
How to face with 4 hoppers in a circle? I can't honestly tell whether I have them facing in the right direction - don't know what to look for.
So the examples I've been using all have a certain ring radius where it switches their game mode back to adventure. If they're so far away that they're not in that ring they won't be switched back.
If everyone gets exactly one area to have creative mode, you can change the adventure mode command block to simply have a minimum radius and affect all players outside that radius, no matter how far away they are (this will also catch people who escape into the Nether and come back to the overworld far away. They'll probably retain creative mode while in the Nether but when they come back they'll be put into adventure mode if they're outside that radius).
gamemode 2 @a[name=!owner,rm=50,x=123,y=60,z=123]
That would catch all players 50+ blocks away from 123,60,123.
The other examples with having a minimum and maximum radius are for if you want one player to have creative mode in more than one area. Using a minimum-only one like ^ above would cause conflicts between the two areas (i.e. say they have one base at X/Z 600,600 and one at 200,200 and each one has a 50 block radius... well if they're at 200,200 then they're at least 50 blocks away from 600,600 so their game mode is being set to Adventure by 600,600 and Creative by 200,200.. it would lead to unpredictable results).
It may help to experiment with a simple superflat map and try to plot the points that the command blocks should affect (like put a wool block in the center of the area, put one 50 blocks away, then one 60 or 70 blocks away (these two blocks would be the inner and outer radii of the adventure mode ring) and figure out what's going on. A player standing between the 50 and 60 block wool blocks should be set to adventure mode.
The way we're hoping to use it would be that all players are perpetually in creative UNLESS they enter the set radius of a specific "dwelling". Because each of them are building, all over the world, our only interest is to give a player the option to "protect" a built out area of their own (once they build it) so that inadvertent damage to a region around that area (like the 'house' itself) isn't a threat.
In function: If a player builds themself a house, they can request "protection" from me for that house. In theory, I would obtain the central coordinates for the house (or something close), estimate a reasonable radius, and set an automatic command from my "central hub" (within a short distance from spawn - only I can modify) that enables creative mode for just that player, while that player is in his/her "house". If another player enters the area to explore, they are automatically set to adventure (thereby preventing them from unintentionally damaging) until they leave the "area/house/radius". Once that other player leaves (non-owner), they're automatically returned to creative.
I think I may have to issues: there very well may be a conflict in the coordinates and radii settings, but first, I don't have an "automatic" command situation working. The commands (somewhat) work if I happen to toggle the lever under the proper circumstances. I need it to always be functioning, automatically.
The hopper block has a bottom part that "attaches" to an adjacent block (in the picture above they're attached to each other, so their bottoms are touching). To make a circle of hoppers, you'd do something like:
Here's a screenshot of how the hoppers end up looking from below (spectator mode):
It's a bit hard to see with the default texture pack but their bottoms are all pointed counter clockwise in a circle towards the next hopper.
I've built a simple test map that seems to work for me.
It's a simple Superflat world.
So as you walk towards the Gold Block, you should start seeing notifications of your game mode switching to Creative while you're between the Green and Red Wool, and being switched to Adventure while between the Red Wool and Gold Block.
You can right-click the command blocks to see how they work. They use
owner=testing so that the owner of the protected region is a player named "testing" (this will be sure to affect your character in-game because your player name probably isn't "testing")... if you edit the blocks to substitute your player name, it shouldn't modify your game mode at all when you wander around the Gold Block.
Edit: In "production" use, to suppress the noise generated by game modes constantly being updated, add an "m" flag to each command block's arguments to only target players with a specific game mode. I.E. so if they're already in Adventure Mode, they won't be set to Adventure Mode repeatedly.
gamemode 2 @a[name=!owner,m=1,...] the
m=1 will only match if they're currently in Creative Mode. If they're already in Adventure, it won't re-change them to Adventure.
And vice versa for creative mode (
gamemode 1 @a[name=!owner,m=2,...])
Hi, this is a great article and I got really excited that the effect command would be exactly what I was looking for...
I'm trying to stop people from digging holes out of the bottom of the world so I thought
effect @a 4 3600 5
with something to set the block type=Bedrock would work but that's invalid.
Am I even on the right lines here or is there a better approach? A response would be much appreciated :)
You can't apply status effects to blocks. They only work on entities (players and mobs mostly, also they can technically apply to things like mine carts and armor stands but they won't have any effect ;) ).
Status effects also have no effect at all on creative mode players (at least, ones that stop them from breaking things). Even if you apply Mining Fatigue 5 (which normally makes it absolutely impossible to mine a block), a creative mode player is still unaffected (their arm will swing slowly but the block will still be destroyed just as quickly as without the effect).
One idea though is to use a command block that will execute a command relative to a creative mode player, which sets a square of bedrock blocks at Y=0 (the bottom of the world). Something like,
execute @a[m=1] ~ ~ ~ fill ~-3 0 ~-3 ~3 0 ~3 bedrock keep
Put that on a fast redstone clock. The command will target all players in Creative Mode (
@a[m=1]), and end up running the command
fill ~-3 0 ~-3 ~3 0 ~3 bedrock keep from the point of view of said player.
The fill command will create a 4x4 square of bedrock, 1 block tall, at level Y=0 (the very bottom row of blocks in the world), directly below the player (doesn't matter what height the player is at). So if they're trying to dig down through the bottom layer of bedrock, it will instantly repair itself. However, if somebody is standing directly on this layer, they may still be able to fall through in the brief moment between the block being destroyed and the command block replacing it.
To counter that you can make the bedrock 2 blocks thick (set the second 0 to be a 1), so if somebody is standing directly on the bedrock (feet at Y=2) and you break the block under them, they'll fall down one block and the bedrock will be replaced. The effect is their feet will be under the ground a little bit (they can still jump up out of there) but they won't fall straight into the void. And if the blocks repair themselves fast enough, nobody will be able to knock out 2 layers of the bedrock fast enough to make someone fall all the way through.
Keep in mind though that in a standard Minecraft world, only Y=0 is guaranteed to have bedrock everywhere. Layers from Y=1 to Y=4 have bedrock intermittently scattered around at various heights and positions. So using the command block to make a 2 block thick layer of bedrock will change the appearance of the world at that level (i.e. if you were to mine out a large area around bedrock, you'd be able to "trace the paths" of creative mode players by seeing the shapes that the obvious out-of-place bedrock blocks take ;) ).
Awesome, thanks very much for the speedy and thorough reply! I'll give it a go and hopefully peace will reign once more...!
Noah, the download link you provided for the protection area test... forgive me, but what folder is that placed into so that I can load it from the game?
Seriously new to this.
Put it in the "saves" folder inside the Minecraft profile folder. Two ways to get to the Minecraft profile folder:
%appdata%\.minecraft\and hit enter.
On Windows 7+ it's typically in
C:\Users\<name>\AppData\Roaming\.minecraft and on Mac and Linux it'd be in
Extract the zip file into the "saves" folder in the Minecraft folder.
So, no texturepacks folder.. I made one.
Only have from Options -> Resource packs. No go.. SO, I tried extracting the folder to "resourcepacks", that didn't work either, it doesn't show up in minecraft.
So, I deleted my copy, redownloaded, started from scratch. This time I didn't have either folder, texturepacks or resourcepacks.
Ok... fine, created. Does it show up in Minecraft? Nope.
Last attempt (and yes, running this on a windows machine at the moment, but if this continues.. heh, I should try this on a linux machine) I'll reboot..
To clarify, you don't copy the world folder into your "resourcepacks" folder, you'd need to navigate Up one folder from there and you should see a "saves" folder, you put it inside there.
Assuming you're on Windows 7 or higher, hit Start, type
%appdata% and hit Enter. It should open a folder named "Roaming" and there should be a ".minecraft" folder, open that and then there should be a "saves" folder. Put the world's folder in there.
Or, if you're familiar with how to run a Minecraft Server, usually a server folder has a folder named "world" in it.... basically, rename the folder from my zip file as "world" and use it in the Minecraft Server folder, and then start the server & connect in-game to it.
And finally - How, exactly, does one get the redstone dust on top of the command blocks...
Oh, shift+right click. Ok, good.
And to light it? If I set a torch next to the dust, it will light the dust, but not activate the repeator or comparator. I promise, last question.
Nevermind.. forgot the redstone in the hopper.
So, if I die while in adventure, and respawn, I respawn in adventure. How is this possible if the entire server is set to creative by default?
Also, getting it to switch back to Creative once I leave the area that isn't "mine", I still don't switch back. In your example, I did.. and sometimes in my build I do, but it's almost like it's random? Decrease rm?
You might have to decrease rm (or increase r), make the creative mode transition area wider in case players are moving through it quickly or anything.
The default gamemode on servers only apply to brand new players joining for the very first time. It doesn't have any effect on respawns, unfortunately. So if they die in adventure mode and respawn, they'd have to go to somebody's house to get put back into creative mode. ;)
If everybody's spawn points are in their own houses (their protected areas), a third command block can be used to set the owner to creative mode while near their house. So when they die and respawn, they'd be in their house and they'd be put in creative mode right away.
Ok, thanks.. I'll think on that. I've contemplated on having them respawn in their houses, but I like them starting where they left off when they signoff/on. Less confusing for them that way (especially the youngest ones).
I'm starting to wonder whether the majority of them can even handle Adventure mode. We're using an island biome with massive mountains and cliffs. It would work well on a superflat, but it's almost impossible for some of these kids. They've constructed dwellings on the very top/mesa of the mountains, with minecart rides on Swiss Family Robinson scale.
Yesh... I'm starting to wonder if bukkit isn't what I should consider. I just don't want to mess with modding the server. It's running on a linux system, virtualized, behind a firewall, and accessed through a hosted dns. The server is one of a couple that feed my LAN, VOIP, and other aspects of my internal network, and I just don't want the vulnerability the mods introduce (both in lag, updates, and security). Not to mention the time it takes to convert... I can't devote hours a day to this unfortunately.
Going off topic here, sorry. I am curious if you have any thoughts though, in addition to what you've already stated on the subject on your blog.
Instead of imbuing players with undesirable effects I just opted to teleport any player within a 200 block radius, who isn't me, to some undesirable location...
/tp @a[m=0,r=200,!name=praqoon] 112518 66 176212
and food luck to them! :)
Can you add a radius command to /clear @a flint_and_steel so it only removes this item in certain areas?
in 1.7.10 sorry
The command should work in 1.7 too.
/clear @a[r=60] flint_and_steel to remove it from players within 60 blocks of the command block.
I have a simple comment. Great!
So when a player leaves the area and the circuit isn't loaded then returns, how can I get it to start back up again?
The circuit has to be self-starting. Most clocks are; i.e. hopper clocks. If the hoppers are unloaded from memory and then reloaded, one of them will detect the item in its inventory and push it into the next hopper and it will start working again automatically.
Manually started clocks (i.e. a ring of repeaters where you have to push a button, or place/destroy a redstone torch quickly to get it started) will stop working if they're unloaded. But they should be fine if you build them in the spawn chunks, as those never unload.
I use a 56 second piston clock and give fatigue for 60 seconds. That way you dont spam your logs and the clock never fails even when reloaded.
Just google Etho's hopper clock.
It didn't work for me, but I used a / in front of everything. Would that affect anything?
I'm making a horror map with command blocks and I don't want the player to go into the buildings yet. How do I keep them out (just until I want them to go in) without using pressure plates or the tp command? And also how do I make it so that when they walk into a room it teleports them out of the room(without the tp command)
website looks AWESOME by the way. im learning to make my own in school.
/give @p barrier). Either on the outside of the door (preventing them from getting close to it), or on the inside. If you use a pressure plate on the inside that opens the door to leave, the barrier block could go above the pressure plate (at eye level) and still get the same effect.
tpcommand somehow or another.
He Kirsle, nice to see that you are still active! I just want to know, how would you go about setting up a survival/adventure mode hybrid server? Adventure mode would need to be active in some areas of my world for an RPG element (players cannot alter terrain, mine, place blocks, etc) but it will also have a designated zone for survival. How would you set up command blocks to run adventure mode globally (as 75% of the world is RPG) and still have the remaining 25% be survival? Furthermore, if a player dies in RPG land, and they return to their bed in survival land, how could it be setup to autmatically detect that they have left the RPG realm upon death?
My initial idea was to create a huge area with adventure mode and put "nodes" of command blocks at its border to change the player to survival the moment they get toward the survival land. But I would imagine that this would not work if a player is walking, game turns into adventure mode for them upon entering RPG realm, and then when they die, they get sent back to survival realm but "skip" the node that is supposed to return their game mode to survival (as they get teleported to bed upoin death). Any ideas? Let me know if its still confusing, I can draw up a diagram if it helps :D
Depending on the size of the survival mode area, you could just put command blocks sprinkled around the area covering a range of (say) 40 blocks or so.
Each command block station could have two commands:
gamemode 0 @a[r=40]
gamemode 2 @r[rm=40]
The basic idea being "players within 40 blocks are survival, outside are adventure."
(It might be better to put these command blocks in your spawn chunks, with X/Y/Z coordinates in them, and have only one pair of blocks, with a radius large enough to cover your entire survival area. This eliminates the problem of command blocks being unloaded from memory depending on which chunks are active).
But you might run into issues where two of these command blocks overlap as a user's game mode would be rapidly toggled between both modes because two different sets of command blocks are acting on them.
So maybe another idea is to have the survival area command blocks just apply a temporary status affect to the players (maybe Mining Fatigue 0? something that's basically a no-op, but which expires after a certain length of time).
So your survival area would just keep re-assigning 5 seconds or so of a no-op status effect to all players in its area. Then, a global command block (in the server spawn chunks) could test for their status condition and set their game mode accordingly. If the commands keep re-giving the status at a faster interval than it expires, the user will stay on survival mode until they leave the area, the effect wears off, and the other command block switches them to adventure mode.
I don't know the specific commands to do this, though. You might also be able to use scoreboards and implement your own countdown timer, too. I did something similar with my Limbo in Vanilla Minecraft experiment.
In that system all users in the survival area would keep getting a dummy scoreboard assigned to say "5" or something, and a global command block (spawn chunks) would attempt to decrement that by 1 each second. When the number drops below 1 or so, another global command block would set all players with that scoreboard to adventure mode and remove that scoreboard from the player.
Do you have any idea on how to set the command line up so that a command block in spawn chunks can load a "survival parameter" in a different part of the world? You mentioned x,y,z coordinates be put into the command line for: gamemode 0 @a[r=40] gamemode 2 @r[rm=40] Where in those commands would I begin entering the coordinates? Apologies for coming off noobish, I just started messing with command blocks after coming from console edition (been playing console edition for 3 years and NO commands still!)
And thank you so much for the help! Its really good advice, i will have to attempt this when I get out of my shift at work haha.
EDIT: Also, is there a way to set these survival/adventure boundaries in a different format that isnt a radius? Like is there a command that changes the shapes border from radius based to paramter or square shaped?
@Joe: using the
x/y/z parameters to the player selector.
So it'd be like
gamemode 0 @a[r=40,x=23,y=60,z=-123]
You might be able to get a box shape by using x/y/z as one corner and dx/dy/dz as the other instead of using the
rm options, but I've never done anything with that so I'm not 100% sure that's how it works.
Fair enough. Well, looks like I have some testing to do tonight! Thanks again for you assistance! You are the only source of info thats reliable about this question for anti-griefing within vanilla minecraft. And the only one still active and willing to help out haha. Would you mind if I came back here with my findings to report to you and the readers?
This technique makes block grief-proof against player trying to mine, but not TNT blocks placed my players… Anyway great trick nonetheless !
what i do is put villagers in a room on presure plates so they keeep walking on them