Talk:CommandBook/Commands
Contents |
[edit] /warp and /tp command improvement suggestions
Ok, so the overall the command system here is pretty good and much better than Essentials, however this is room for improvement and I'd like to make some suggestions.
My users in SMP and I have found that some commands are confusing due to required verbosity and strictness. I'm talking about things like if you want to go to a different world in a multi-world server, there is no good easy /MOVE-ME-HERE WORLD-NAME syntax. The easiest I've found is /tp #spawn:world. I have a few suggestions to make things easier for everyone.
First of all, /warp and /tp do the same thing. The move a target to a destination. Part of what's confusing is the two command use different syntax and take different arguments. Let's merge those two commands and make them take the same argument set. Better yet, let's get rid of /warp (but I can see the value in keeping it since some people may expect that command).
In addition, while the syntax for those two commands is powerful, there are too few abbreviated versions to be useful in some common situations like jumping to a world. If I name a world using /warp WORLD then I expect to end up at either the spawn point in that world or the last location I was at in that world with the default being the spawn point. The latter is more difficult to implement but also more useful, so I would strongly suggest it.
So, in the interest of simplification of the syntax, I would suggest this: If the user enters anything that could be a destination then take that user to that destination. What does it mean to be a destination? Well, it breaks down into a coordinate and a world name. If the user types out a coordinate (and please allow spaces and allow leaving out the height-coordinate-portion. It's so much easier to use with both are ok. Here's a regular expression to help: /(-?[0-9]+)(,| ) *(-?[0-9]+)((,| ) *(-?[0-9]+))?/; matching forms: [x,z] [x,y,z] [x, z] [x, y, z] [x z] [x y z]; capture-buck numbers: $1 == x; if $6 is empty { $3 == z; calculate height } else { $3 == y; $6 == z }) then assume the current world. In addition, it would be nice if two coordinates were allowed and just put the player at the highest land at that point.
So, in conclusion this might work better as a 'get to a place' command set:
| Command | Description | Permissions |
|---|---|---|
| /warp destination /tp destination |
Moves the current player directly to the specified destination. The destination may be any of the following:
|
|
| /warp target destination | Moves the specified target directly to the specified destination. Destination as above. Target may be any of the following
|
[edit] Examples
- /warp player-name player2-name
- Would move player-name to the location of player2-name
- /warp player-name player-name
- Issues a warning. Move player-name to the location of player-name?
- /warp player-name world-name
- Confusing because player name could be a target and a destination. Since another destination was entered here, the desired target must be the player. Move player-name to world-name.
[edit] Some conflict resolution
- What if the name of a world and the name of a warp are the same?
- That destination will take the player to that warp. This allows overriding of the default of taking the player to the spawn point, or the last player location in that world.
- What if two warp names match on two different worlds?
- Take the player to the warp in the current world. Warn that the warp exists on another world.
- Otherwise: issue an error 'ambiguous destination. warp-name exists in multiple worlds: world-list'
[edit] Some restrictions
- Don't allow a warp name mating the name of a world to be in any world other than that world.
- If a warp existed after a new world is added with a matching name, maybe ignore the warp?
So, this is all quite complicated to implement and I don't expect it all. Just take a look and let me know what you all think.
Servel333 07:08, 29 December 2011 (PST)
[edit] How to give enchanted items?
I've been trying to use /give and /item(/i) to give tools with multiple enchantments, but I am having no success. How would I give, for example, a diamond axe with Efficiency V, Unbreaking III, and Fortune III? Please help me :D How to give a tool with ONE enchantment at least?
do \item diamondaxe|digspeed:5,durability:3,loot_bonus_blocks:3
I've been struggling with this too and looked at the CommandBook to figure it out.
- \item diamondhelmet|PROTECTION_ENVIRONMENTAL:1
- \item diamondhelmet|PROTECTION_FIRE:1
- \item diamondhelmet|PROTECTION_FALL:1
- \item diamondhelmet|PROTECTION_EXPLOSIONS:1
- \item diamondhelmet|PROTECTION_PROJECTILE:1
- \item diamondhelmet|OXYGEN:1
- \item diamondhelmet|WATER_WORKER:1
- \item diamondsword|DAMAGE_ALL:1
- \item diamondsword|DAMAGE_UNDEAD:1
- \item diamondsword|DAMAGE_ARTHROPODS:1
- \item diamondsword|KNOCKBACK:1
- \item diamondsword|FIRE_ASPECT:1
- \item diamondsword|LOOT_BONUS_MOBS:1
- \item shovel|DIG_SPEED:1
- \item shovel|SILK_TOUCH:1
- \item shovel|DURABILITY:1
- \item shovel|LOOT_BONUS_BLOCKS:1
- \item bow|ARROW_DAMAGE:1
- \item bow|ARROW_KNOCKBACK:1
- \item bow|ARROW_FIRE:1
- \item bow|ARROW_INFINITE:1
- \item bow|ARROW_DAMAGE:1,ARROW_FIRE:1
based on Enchantment.java
Servel333 18:08, 29 February 2012 (PST)