Necessities - a pseudo-port of Essentials (ala Bukkit) to Forge.
Features:
Server only mod - no client side changes
Every command can be disabled in the config file
Auto save of data option in the config file allows you to specify how many minutes between saves (or zero to disable)
/nick command can be set for use either by players or only by OPs in the config file
Chat filter to allow for color and formatting codes when chatting (and in nicknames)
Message of the day commands
Commands relating to player homes (essentially a teleport command to housing)
Version 0.6.6 and above support the MCPermissions mod (which I highly recommend!)
Beginning to implement some WorldEdit style commands (which can be disabled in config file).
Open source - hosted on Github
/toggleeditwand
Toggles whether the wand item is usable as normal, or as the wand. Default is as a wand.
/desel
Clears the current selection for WorldEdit
/tpdenyall <true/false>
Blocks all incoming teleport requests (from any direction). Other player will get a message indicating that the teleport has been prevented.
/tpreject
Reject another players teleport request.
/tpaccept
Accept another players teleport request.
/tpahere <player>
Requests to teleport another player to your current location. The other player must accept using /tpaccept or reject with /tpreject.
/tpa <player>
Teleport the player issuing the command to the specified player. Destination player will be prompted for permission, which must be granted with /tpaccept.
/wand
Gives the player the wand item as defined in the configuration file. The default item is the wooden axe. Note that this option in the configuration file does NOT accept metadata based items so you cannot use 1372:6 or the like.
/butcher <radius>
Kills all hostile mobs within the provided radius. Does not leave drops and does provide a count of mobs removed. Future update will allow you to specify entity name to be removed.
/drain <water/lava/oil> <radius>
OP command to drain either water or lava (or oil eventually) in a radius around the user. Yes, this is a first attempt to replicate a WorldEdit command. Removing oil does not work fully yet as the version of Forge I was using did not handle both moving and still blocks for liquids. I will update this when I do the 1.4.7 update.
/meminfo
Display current memory usage and total number of loaded chunks. The number of chunks is across all dimensions so expect it to be somewhat larger than you would think.
/listops
Player command to list all the people with OP status on the server.
/whoami
Tells the player what the server thinks their username is. Note that on SSP games this will not be your login name like one would expect.
/seen <name>
Player command to determine when a player <name> was last on.
/realname <nickname>
Find the players login name based on their nick name.
/setwarp <warpname>
OP command to create a warp point. The warp is set based on the current position of the user of the command.
/warp <warpname>
Player command to teleport the player to a named warp point.
/warplist
Player command to list available warp points.
/delwarp <warpname>
OP command to delete a warp point.
/sethome [name]
Player command to create a new home for player use. If no home name is specified then "[Default]" is used.
/home [name]
Player command to transport the player to their home named <name>. If not specified, defaults to a home named "[Default]"
/delhome <name>
Player command to delete a previously created home.
/listhome
Player command to list the homes currently defined by the player
/sethomecount [#]
OP only command to set how many homes players are allowed (1-10)
/setspawn
OP only command to set spawn location
/spawn
Player command to transport player to the spawn site
/back
Player command to go back to previous location upon death or use of /home
/mods
Player command to show all loaded mods
/motd
Display the message of the day
/setmotd [message]
OP only command to set the message of the day
/nick <player> [nickname]
Player command to set a nickname. This can include the use of color codes (&1, &2, etc.)
When using MCPermissions, the options to enable or disable the commands in the configuration file take precedence. So you can disable the "/back" command for example and then no matter who has the permission node necessities.back they will still be unable to use the command. Disabling the command in the configuration file completely prevents the command from being registered.
necessities.desel
necessities.toggleeditwand
necessities.back
necessities.delhome
necessities.delwarp
necessities.drain
necessities.gm
necessities.home
necessities.listhome
necessities.listops
necessities.meminfo
necessities.mods
necessities.motd
necessities.nick.self
necessities.nick.others
necessities.realname
necessities.seen
necessities.sethome
necessities.sethomecount
necessities.setmotd
necessities.setspawn
necessities.setwarp
necessities.spawn
necessities.warp
necessities.warplist
necessities.whoami
necessities.butcher
necessities.wand
necessities.tpa
necessities.tpahere
necessities.tpaccept
necessities.tpreject
necessities.tpdenyall
Arbitrary MC image to comply with forum posting rules.
All data for these commands is stored in the file necessities.dat in the world folder. If you stop the server and delete this file all homes are lost and spawn will revert to the default.
A chat filter is installed that allows for use of colors and formatting codes defined in Minecraft (i.e. &1 &2 etc...) These codes can also be used in the /nick command for color coded names. Note that the random character code is not allowed and will NOT be added.
I program every day and am always looking for ideas for other commands to add to Necessities. If you have suggestions please post below
Note: The /back command does NOT work after the /tp command. This is because /tp is a built-in command and I have no access to the position before the command is executed.
Permissions: Feel free to use this mod however you wish. I wrote it for fun so enjoy!
Installation: Drop the file into the server's mods/ folder and start the server.
Changelog:
Added the /limit command and enforced it for /drain
Added notification messages to /tpa
Modified /tpaccept to properly save the /back location after a /tpa command.
Updated the /setmotd command to now accept color and formatting codes.
Refactor permission code to simplify addition of other permission mods
Correct permission node for /tpaccept (was using "necessities.tpreject" darn copy/paste lol)
Added /toggleeditwand command
Added /desel command
Modified /home and /sethome so that if you do not specify a home name, it uses "[Default]" as the home name.
Modified /butcher command to take an extra optional parameter to specify the mob to be killed. It must be spelled correctly and may contain partial names (i.e. /butcher 100 ager will kill all villagers within 100 blocks of you).
Added the /remove <radius> command to remove items left laying on the ground.
Added config file option to disable the chat filter. Note that setting this will also disable nicknames and text formatting codes.
Added /gm command to switch game modes easily. Use /gm <c/s/a> to change to creative, survival, or adventure mode.
Added the /tpahere command to teleport another user to your location. Normally requires OP privileges but can be overridden with MCPermissions. An alias to /summon is also present for convenience.
Added /tpdenyall command to prevent others from requesting teleports to or from you.
Uploaded source to github
Added /tpa command.
Fixed issue with /nick no longer allowing Chinese characters. When you specify valid characters in the configuration file you no longer need to specify alphabetic or numeric characters as these are always allowed.
Added option to configuration file to always use normal (i.e. <>) brackets in chat filter.
Added the /butcher command so that OPs (or those with permissions) can destroy all mobs in a given radius.
Fixed the /drain oil command to work correctly.
Added the /wand command to provide the 'wand' item used by WorldEdit to the user. Defaults to OP only but can be overridden with MCPermissions.
Completely rewrote permissions system to make use of MCPermissions when it is available. A list of permission nodes will be added when available.
Added configuration file option for the list of valid characters that can appear within a nickname. Note that the quotation mark and ampersand (&) are still not valid and will result in the use of the default character set.
Changed the format of the command line for the /nick command to always require a player name.
Added /meminfo command
Added /drain command
Added capability to autosave data. User configurable timer defaults to every 15 minutes.
Refactor of user permissions for commands to simplify eventual addition of a permissions plugin of some sort
Added a fix so that users with uppercase letters in their name will now be properly detected as ops.
Added a configuration file so you can enable or disable any of the commands you wish to. If you disable a command it will not even show up in /help.
Hopefully fixed the OP problem on Mindcrack servers.
Made changes suggested by an anonymous modder to allow the saving of location and orientation in all commands. So far it seems to work as intended but if you have problems please let me know in the comments.
Added the /whoami command to assist with helping users figure out problems.
You WILL need to delete your necessities.dat file before starting this version. Unfortunately the older versions did not contain all the data needed to work with this version so there was no way to just upconvert it. This will mean that your users will lose all homes they have set.
Fixed compatibility problem with PowerTools mod.
Added commands to work with warps.
Added /seen command.
Added /realname command.
Added notification messages for commands that were not providing feedback.
Fixed a problem caused by newer versions of Forge actually doing what they say for once.
Modified OP detection code to work with new version of Forge.
Yes, my HTML skills suck. This page is ugly blah blah blah. Sorry, am better at programming than making things pretty
Awesome mod! Works perfectly. Hoping you can update to 1.4.6! I used bukkit just for these commands, at the cost of some mods. Now, I can use both! Thanks again!
Awesome mod! Works perfectly. Hoping you can update to 1.4.6! I used bukkit just for these commands, at the cost of some mods. Now, I can use both! Thanks again!
Glad you liked it! I will definitely be updating to 1.4.6 as soon as time and family obligations allow. Will also be adding a /seen command to check when a player was last on.
Is it possible to have this on Singleplayer too?
Because that would be fantastic when playing LAN with friends!
It will work with some caveats on single player. The commands that are marked as OP only will not work on SP. This is because of how the single player server works. You can still use the other commands, although you will be limited to 3 homes. I would love to make the whole thing work on SSP, but haven't been able to do it since the username is a random (i.e. Player893) generated name.
Important note: Since the player name is RANDOM in single player, if you set a home, it will be lost the next time you log out and log back in. This is because your player name will change between games. However /back will work after you die in all cases.
Hey, thank you so much for a mod like this! My server has been bugging me to port to bukkit and I don't want to do that, but this basically gives them everything they've been wanting bukkit-wise.
Although I am having a problem right now. Even though I am the owner/operator of the server, it is saying I do not have permissions for the OP only commands. I have restarted the server a couple times, put the mod into my own mods folder, and de-opped and re-opped myself.
Any help will be appreciated! Thanks for the mod and your help!
Hey, thank you so much for a mod like this! My server has been bugging me to port to bukkit and I don't want to do that, but this basically gives them everything they've been wanting bukkit-wise.
Although I am having a problem right now. Even though I am the owner/operator of the server, it is saying I do not have permissions for the OP only commands. I have restarted the server a couple times, put the mod into my own mods folder, and de-opped and re-opped myself.
Any help will be appreciated! Thanks for the mod and your help!
The only way I can think of that this could happen is if you have opened a single player game to LAN (either local or hamachi). That causes the player name to not match that of the login account. If this is the case there is something you can do. You can download the minecraft server from minecraft.net and copy the save file (world folder, or whatever it is called) and use it on the server. Fortunately the file formats are the same.
The way I check for OP status is by retrieving the set of OPs for the server and then comparing the name.
If this isn't the case can you get me a copy of the necessities.dat file from your server and the login name you are using? I can use NBTExplorer to check the file and see if that gives me any clues.
Thank you for updating this, Now I can have nicknames on my FTB server.
Do you think you can add /rules also?
Shouldn't be any problem. Just have to figure out where to put things. I should be able to work on that and /seen after I get back from the in-laws on the 2nd. Hope to have it updated with the new stuff by next Friday.
It would be nice if the /nick was op only and you could set the nick for other players. I could see some bad people doing some bad things with it. Now that I am thinking about it maybe the ban should work with the nicks as well. Thanks for reading and I hope it made sense.
It would be nice if the /nick was op only and you could set the nick for other players. I could see some bad people doing some bad things with it. Now that I am thinking about it maybe the ban should work with the nicks as well. Thanks for reading and I hope it made sense.
That made perfect sense to me. Unfortunately I've seen the results of that and it leads to a problem that most servers are unwilling to deal with. Mods get really busy when people want to change their nicks. I've played on servers that handle it both ways and have generally found that being able to set ones own nick seems to be less hassle for the mods/admins. Players like being able to do it, and the mods are still around to watch for people doing odd things with it. I considered a profanity filter, but given the ingenuity and previous failures at such a thing decided against it.
One thing I will add when I get home from the in-laws is a /realname command that will let you find out the players real login name from their nickname. It will deal with the color codes too so a user doesn't have to enter those. One more thing for the sticky note
That made perfect sense to me. Unfortunately I've seen the results of that and it leads to a problem that most servers are unwilling to deal with. Mods get really busy when people want to change their nicks. I've played on servers that handle it both ways and have generally found that being able to set ones own nick seems to be less hassle for the mods/admins. Players like being able to do it, and the mods are still around to watch for people doing odd things with it. I considered a profanity filter, but given the ingenuity and previous failures at such a thing decided against it.
One thing I will add when I get home from the in-laws is a /realname command that will let you find out the players real login name from their nickname. It will deal with the color codes too so a user doesn't have to enter those. One more thing for the sticky note
Loving the mod, keep up the good work!
UPDATE: Just ONE thing, after installing your mod onto my MindCrack (v6) server running the latest Minecraft the /help command stopped working as an OP. Players could access /help however.
You might want to look into this, as it impairs basic server functionality. (Come on, it's /help!)
UPDATE: Just ONE thing, after installing your mod onto my MindCrack (v6) server running the latest Minecraft the /help command stopped working as an OP. Players could access /help however.
You might want to look into this, as it impairs basic server functionality. (Come on, it's /help!)
What is happening is something that updated in 1.4.6 broke something and I didn't have time to fully test it before I left for a visit to the in-laws house. When I get home I will figure out what is going on and get an update out. AFAIK /delhome and /help are affected - although I'm still not sure how they are being affected.
As for what happened. The new version of forge completely redid how new commands work. As usual there is no documentation on how it was done to help devs fix things up. That's the major reason I prefer coding for bukkit. At least it's consistent and things don't get broken between releases without some sort of documentation. The guy who writes the code for forge might be a good coder but has no idea how to lead a team or how to work with others and treats documentation as an "optional" component.
Amazing, I've been looking for this type of mod. Is it possible to implement /setwarp, /warp, and /warplist? That would be awesome . Thank you.
If you can tell me what those commands do or what mod they are from in bukkit it should be quite possible. When I get home and have access to my development machine again I'll check up on that
If you can tell me what those commands do or what mod they are from in bukkit it should be quite possible. When I get home and have access to my development machine again I'll check up on that
Basically it works the same way as your multiple home systems lol. Usually regular home is bound to one location and the setwarps act as the multiple homes you have setup. So it's basically there xD.
I would really love to see more commands in the future. I do not know whether it is possible for you to implement it or not, but protection for certain areas would be really lovely, like WorldGuard does.
UPDATE: Just ONE thing, after installing your mod onto my MindCrack (v6) server running the latest Minecraft the /help command stopped working as an OP. Players could access /help however.
You might want to look into this, as it impairs basic server functionality. (Come on, it's /help!)
There will be an update either later this evening or tomorrow that will fix these items and will add a few more commands. Just doing code cleanup and documentation right now.
Features:
When using MCPermissions, the options to enable or disable the commands in the configuration file take precedence. So you can disable the "/back" command for example and then no matter who has the permission node necessities.back they will still be unable to use the command. Disabling the command in the configuration file completely prevents the command from being registered.
Arbitrary MC image to comply with forum posting rules.
All data for these commands is stored in the file necessities.dat in the world folder. If you stop the server and delete this file all homes are lost and spawn will revert to the default.
A chat filter is installed that allows for use of colors and formatting codes defined in Minecraft (i.e. &1 &2 etc...) These codes can also be used in the /nick command for color coded names. Note that the random character code is not allowed and will NOT be added.
I program every day and am always looking for ideas for other commands to add to Necessities. If you have suggestions please post below
Note: The /back command does NOT work after the /tp command. This is because /tp is a built-in command and I have no access to the position before the command is executed.
Permissions: Feel free to use this mod however you wish. I wrote it for fun so enjoy!
Download:
Changelog:
Yes, my HTML skills suck. This page is ugly blah blah blah. Sorry, am better at programming than making things pretty
Glad you liked it! I will definitely be updating to 1.4.6 as soon as time and family obligations allow. Will also be adding a /seen command to check when a player was last on.
Because that would be fantastic when playing LAN with friends!
It will work with some caveats on single player. The commands that are marked as OP only will not work on SP. This is because of how the single player server works. You can still use the other commands, although you will be limited to 3 homes. I would love to make the whole thing work on SSP, but haven't been able to do it since the username is a random (i.e. Player893) generated name.
Important note: Since the player name is RANDOM in single player, if you set a home, it will be lost the next time you log out and log back in. This is because your player name will change between games. However /back will work after you die in all cases.
You bet! I just didn't think to do so
Although I am having a problem right now. Even though I am the owner/operator of the server, it is saying I do not have permissions for the OP only commands. I have restarted the server a couple times, put the mod into my own mods folder, and de-opped and re-opped myself.
Any help will be appreciated! Thanks for the mod and your help!
The only way I can think of that this could happen is if you have opened a single player game to LAN (either local or hamachi). That causes the player name to not match that of the login account. If this is the case there is something you can do. You can download the minecraft server from minecraft.net and copy the save file (world folder, or whatever it is called) and use it on the server. Fortunately the file formats are the same.
The way I check for OP status is by retrieving the set of OPs for the server and then comparing the name.
If this isn't the case can you get me a copy of the necessities.dat file from your server and the login name you are using? I can use NBTExplorer to check the file and see if that gives me any clues.
Hope that helps!
Do you think you can add /rules also?
Shouldn't be any problem. Just have to figure out where to put things. I should be able to work on that and /seen after I get back from the in-laws on the 2nd. Hope to have it updated with the new stuff by next Friday.
That made perfect sense to me. Unfortunately I've seen the results of that and it leads to a problem that most servers are unwilling to deal with. Mods get really busy when people want to change their nicks. I've played on servers that handle it both ways and have generally found that being able to set ones own nick seems to be less hassle for the mods/admins. Players like being able to do it, and the mods are still around to watch for people doing odd things with it. I considered a profanity filter, but given the ingenuity and previous failures at such a thing decided against it.
One thing I will add when I get home from the in-laws is a /realname command that will let you find out the players real login name from their nickname. It will deal with the color codes too so a user doesn't have to enter those. One more thing for the sticky note
Loving the mod, keep up the good work!
UPDATE: Just ONE thing, after installing your mod onto my MindCrack (v6) server running the latest Minecraft the /help command stopped working as an OP. Players could access /help however.
You might want to look into this, as it impairs basic server functionality. (Come on, it's /help!)
http://pastebin.com/5KkK32da
What is happening is something that updated in 1.4.6 broke something and I didn't have time to fully test it before I left for a visit to the in-laws house. When I get home I will figure out what is going on and get an update out. AFAIK /delhome and /help are affected - although I'm still not sure how they are being affected.
As for what happened. The new version of forge completely redid how new commands work. As usual there is no documentation on how it was done to help devs fix things up. That's the major reason I prefer coding for bukkit. At least it's consistent and things don't get broken between releases without some sort of documentation. The guy who writes the code for forge might be a good coder but has no idea how to lead a team or how to work with others and treats documentation as an "optional" component.
If you can tell me what those commands do or what mod they are from in bukkit it should be quite possible. When I get home and have access to my development machine again I'll check up on that
Basically it works the same way as your multiple home systems lol. Usually regular home is bound to one location and the setwarps act as the multiple homes you have setup. So it's basically there xD.
Which folder do you place in the /mods?
kdx7214? Or the necessities folder?
I am a official representative of XtreamServers.
There will be an update either later this evening or tomorrow that will fix these items and will add a few more commands. Just doing code cleanup and documentation right now.