Posted May 23, 201213 yr Hello there everyone, i just wanted to ask if there is any SMP-Mod for Forge that contains functions to protect certain areas (like for example: faction does), maybe even with the possibility to create groups. I know that Forge is hook-based but since it has its own Multiplayer-Modloader (and does not work with the "old" MPLoader). Maybe someone has an idea on how to protect certain areas. Thanks in advance for any answers.
May 23, 201213 yr get bukkit is about the only current way but it would be nice to see a none bukkit area protection. Maybe someone could program a mod that is similar to area protection of spawn. Then instead of making it op only can build in the area switch it to player base. http://www.mcportcentral.co.za/index.php <- link to mod version of bukkit http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 23, 201213 yr Author Hope someone still reads this. Is there any possibility to write server-side-only Forge-Mods or does there always have to be a client-sided mod?
May 23, 201213 yr Hope someone still reads this. Is there any possibility to write server-side-only Forge-Mods or does there always have to be a client-sided mod? yes you can write server side only mods. you just have too tell the mod that no client side mod is required. However, you are limited too what you can do since most things require client side in order to show player's things. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 23, 201213 yr Author yes you can write server side only mods. you just have too tell the mod that no client side mod is required. However, you are limited too what you can do since most things require client side in order to show player's things. Ok, last question. Is there any mod that could serve as an example? (Preferably written with Forge) Even the smallest example could help
May 23, 201213 yr yes you can write server side only mods. you just have too tell the mod that no client side mod is required. However, you are limited too what you can do since most things require client side in order to show player's things. Ok, last question. Is there any mod that could serve as an example? (Preferably written with Forge) Even the smallest example could help there is a mod that does server side commands on this forum that is server side only. Another is my teams mod(click pic bellow) which is server side only too. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 24, 201213 yr Awsome, I'd like to make such a thing, TomyLobo is cleaning up my code on github Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 25, 201213 yr Awsome, I'd like to make such a thing, TomyLobo is cleaning up my code on github Since you use github could you explain how to use it. The guides i've read are not very helpful http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 25, 201213 yr I had no clue myself, I just made a repository and installed the windows client, made a local copy of the repository, opened the folder and put in my mod file. I haven't found a good tutorial myself Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 25, 201213 yr For using git and github? Github itself has tons of very useful step-by-step help guides, and Google has far far more. It is quite simple once you see.
May 26, 201213 yr I'm looking into an area protection, but it's hard... I don't think there are forge hooks for that, but I have no clue on how to request them, and If I have to make it myself, how they need to be formatted,....., And the MC spawn protection is complicated as f* Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 26, 201213 yr Well I found a way, but I need to edit "NetServerHandler.java" to override parts of "handleBlockDig" and "handlePlace". I now bypass the spawn-protection check there and use the one in "this.playerEntity.worldObj.canMineBlock" (That is overridden by WorldServer.java's canMineBlock so the hook should be added there) , By doing this you can allow and deny block-changes in 1 loop instead of 2. If your mod then wants to deny (or specifically allow) block-changes you only need to 'add' a deny (or allow) condition to the "canMineBlock" hook. (I'd like it to work like the IChatHandler. Intercepting all request and forwarding them to registered handlers and if the mod doesn't deny (or allow) the block-change you let the vanilla code do it) I hope my explanation was clear, I have can't express it better. Ps There is already a spawn-protection in "this.playerEntity.worldObj.canMineBlock", but it doesn't do anything. (to my knowledge) Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 26, 201213 yr I have just sent a Pull-request for a hook that makes stuff like this possible. Now I need to figure out what the best way is to save the 'regions' and there radius. Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 26, 201213 yr You could make it very simple and do protection per chunk like factions and and a few other protection mods do, just store the data in the chunk save handler.
May 26, 201213 yr Yea, maybe... I'm trying to do it list-based now, saved in a .txt file (like the ops are saved) but I'm afraid that's gonna lag a lot Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 26, 201213 yr Yea, maybe... I'm trying to do it list-based now, saved in a .txt file (like the ops are saved) but I'm afraid that's gonna lag a lot Does not matter, that is only saving/loading, not internal processing.
May 26, 201213 yr O nice, I think i wanna format the file like this: Name1;PosX;PosZ;Radius Name2;PosX;PosZ;Radius Name3;PosX;PosZ;Radius Name4;PosX;PosZ;Radius the names would make it easier to manage i think (If a permisson system is added I'dd add ";permlvl", if you are above the lvl specifyd you can edit) Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 26, 201213 yr 8) 8) (If I only could spell) Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
May 26, 201213 yr interesting if you manage too get this working 100% i can stop using bukkit since my only reason for using it is the protection. The rest of the plugins i use can be recreated easily. http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 27, 201213 yr I only need the forge hook approved and make the system error proof (make it so you can add and remove regions ingame and don't kill the server if you type the command wrong) Please send me all the typo's you found, I'm from Belgium and I'm a little dyslectic and suck @ typing. http://dries007.net/banner.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.