Jump to content

Area Protection with Forge?!


Taylantz

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

width=700 height=100http://dries007.net/banner.png[/img]

Link to comment
Share on other sites

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.

width=700 height=100http://dries007.net/banner.png[/img]

Link to comment
Share on other sites

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.

width=700 height=100http://dries007.net/banner.png[/img]

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.