Jump to content

[1.4.2]..[1.4.6] Server mods: Chunk Protection and Chat Filter


Evert

Recommended Posts

[1.4.2][1.4.4][1.4.5][1.4.6] Minecraft

[6.0.1][6.3.0][6.4.x][6.5.0] Forge

 

Players can claim a private chunk where other players can't break or build.

 

/chunk gives information about the chunk you are standing on.

/chunk claim lets you claim the chunk you are standing on.

/chunk unclaim makes it public again.

/chunk add [player1] [player2] .. adds players that are allowed to build in this chunk.

/chunk remove [player1] [player2] .. will remove players from the list.

/chunk clear clears the list of players that are allowed to build on this chunk.

/chunk info [on|off] switches the displaying of information when crossing chunk borders.

/chunk maxchunks [playername] [max] changes the number of chunks that player can claim.

/chunk playerinfo [playername] tells how many chunks that player can claim and how many are claimed.

/chunk unclaimall [for ops:[playername]]

 

Make sure the right versions of Forge and Power Tools Shared are installed.

Place the Chunk Protection ".zip" file in the "mods" folder of your Minecraft Forge server.

 

Changelog

0.1.4

QuickFix: Now protects against water and lava buckets as well.

0.1.2

QuickFix: Maximum players from 1024 to 8192. Maximum chunks from 1024 to 65536.

0.1.1

Variable amount of chunks per player.

/chunk maxchunks [playername] [max] changes the number of chunks that player can claim.

/chunk playerinfo [playername] tells how many chunks that player can claim and how many are claimed.

Added command /chunk unclaimall and for ops /chunk unclaimall [playername]

0.1

Chunks will automaticly be unclaimed after 7 days of not being visited by their owner. Can be changed in config file. Set to 0 to disable.

Op's can now claim for other players. Use /chunk claim [playername]

Added config file setting AllPlayersCanClaim=true. Change to false so only op's can claim chunks.

0.0.9

Fixed bug that gave chat spam with more than one player online.

Added config file with setting for maximum amount of chunks players are allowed to claim and

default setting for display of info when crossing chunk borders.

0.0.8

It still has the bug from 0.0.7 that gives chat spam with more than one player online,

but /chunk info off is now default, so you don't see it.

Op's can now add or remove players from chunks and unclaim chunks owned by other players.

0.0.7

Added /chunk info [on|off] command to turn off the info that shows when crossing chunk borders.

'chunkinfo.dat' will now be stored in 'powertools' folder. When upgrading, make a new folder 'powertools'

in the folder the server runs from and move 'chunkinfo.dat' into it.

Fixed bug where chunks couldn't be unclaimed.

Some small changes with colors.

0.0.6

The owner of a chunk can now add a list of players who are allowed to build and break there as well.

Added chat colors.


For the chat filter, use:

/chat normal for the default chat mode.

/chat player [player1] [player2] .. for player mode, chat is sent only to selected players.

/chat remove [player1] [player2] .. to remove players from the list.

/chat clear to remove all players from the list.


Download from: http://powerbeat.org/minecraft/server_mods/

Link to comment
Share on other sites

  • 4 weeks later...

Ive searched around and cant seem to find the config file..
It gets automatically generated when the mod is started the first time.

Only ChunkProtection makes a file, "powertools_chunkprotection.cfg". It is in the "config" folder.

 

i don't have any issues with it loading, or finding the cfg file.. the issue i have is even op'd i cant use /chunk any commands it tells me i dont have permission and cant find where i should add to have permission

any help? thanks

 

Link to comment
Share on other sites

i don't have any issues with it loading, or finding the cfg file.. the issue i have is even op'd i cant use /chunk any commands it tells me i dont have permission and cant find where i should add to have permission

any help? thanks

The only thing I can think of here, is that you may have Power Login installed as well. Then you have to register and login before you can use any commands.

 

Or do you have any other mods installed that add something with permissions?

Link to comment
Share on other sites

i don't have any issues with it loading, or finding the cfg file.. the issue i have is even op'd i cant use /chunk any commands it tells me i dont have permission and cant find where i should add to have permission

any help? thanks

The only thing I can think of here, is that you may have Power Login installed as well. Then you have to register and login before you can use any commands.

 

Or do you have any other mods installed that add something with permissions?

i'll look thru again.. i dont have the login part, but i'll try removing a few other mods and see what happens..  i had it working while it was on a local machine, then ftp'd to my server host.. and it stopped letting me claim... or anything.. may have to remove all and start again :( not that i want to.. 40 somethn mods to re do kind of sux lol

 

update.. okay i got issue solved.. my own fault :)

Link to comment
Share on other sites

  • 4 weeks later...

please make bukkitforge a dependeny. i use it already and i think most other people who use your mod use bukkitforge as well. blocking turtlus from destroying claimed chunks would be amazing and i really hope you can make that happen :D good luck with this amazing mod!

Link to comment
Share on other sites

This is almost all I need! Thank you.

 

There are problems, though. Players can destroy the land with "Wand of Excavation" from Thaumcraft 3, even if it is claimed by others. I suppose, something other (like Turtles from ComputerCraft) can destroy other's land too.

Can this be fixed?

Link to comment
Share on other sites

This is almost all I need! Thank you.

 

There are problems, though. Players can destroy the land with "Wand of Excavation" from Thaumcraft 3, even if it is claimed by others. I suppose, something other (like Turtles from ComputerCraft) can destroy other's land too.

Can this be fixed?

 

this cant be fixed right now. i suggest banning those 2 things for now. mining turtles and wand of excavation. mining lasers can destroy it as well, but ic2 uses different crafting ways so u cant ban it. u might also wanna ban portal guns since they can pick up items from protected land. //www.minecraftforum.net/topic/1475847-146-forgeirc-v1014-soul-shards-v126-and-recipe-remover-v11-updated-122013/page__st__400 is the link to the mod that allows you to ban items. hope this helps

Link to comment
Share on other sites

please make bukkitforge a dependeny. i use it already and i think most other people who use your mod use bukkitforge as well. blocking turtlus from destroying claimed chunks would be amazing and i really hope you can make that happen :D good luck with this amazing mod!

This is almost all I need! Thank you.

There are problems, though. Players can destroy the land with "Wand of Excavation" from Thaumcraft 3, even if it is claimed by others. I suppose, something other (like Turtles from ComputerCraft) can destroy other's land too.

Can this be fixed?

I am trying to get this fixed by using the Events API that keepcalm extracted from the BukkitForge project, but as of now, I can't get it to work.
Link to comment
Share on other sites

please make bukkitforge a dependeny. i use it already and i think most other people who use your mod use bukkitforge as well. blocking turtlus from destroying claimed chunks would be amazing and i really hope you can make that happen :D good luck with this amazing mod!

This is almost all I need! Thank you.

There are problems, though. Players can destroy the land with "Wand of Excavation" from Thaumcraft 3, even if it is claimed by others. I suppose, something other (like Turtles from ComputerCraft) can destroy other's land too.

Can this be fixed?

I am trying to get this fixed by using the Events API that keepcalm extracted from the BukkitForge project, but as of now, I can't get it to work.

 

i saw the post "Maxed Gaming Server tools" and although the mod isnt out yet he claims to be using the api so i guess you could try to contact him and maybe find out how he managed to make it work.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 months later...

As I understand it, Feed the Beast mods do have fakeplayers they create but because the lack of a BreakBlockEvent in Forge they never trigger any event at all before they destroy the block. Perhaps it could be possible to convince/mod these mods to trigger a PlayerInteractEvent and then check if a plugin (Chunk Protection or any grief prevention) has cancelled that event, and then the machine will not break the the block.

 

This is how ComputerCraft in Tekkit works by using Bukkits BreakBlockEvent. Here is the code from the dig function (this is where blocks get broken):

 

Player fakePlayer = FakePlayer.getBukkitEntity(this.world, getTurtleName());
if (fakePlayer != null) {
         CraftWorld craftWorld = ((WorldServer)this.world).getWorld();
         CraftServer craftServer = ((WorldServer)this.world).getServer();
          BlockBreakEvent event = new BlockBreakEvent(craftWorld.getBlockAt(j, k, l), fakePlayer);
         craftServer.getPluginManager().callEvent(event);
          if (event.isCancelled()) {
                   return false;
          }
}

.. etc ..

 

Block block = Block.byId[i1];
this.world.triggerEffect(2001, j, k, l, block.id + (this.world.getData(j, k, l) << 12));
this.world.setTypeId(j, k, l, 0);

 

 

Note that it sends a BlockBreakEvent with the fakePlayer and then if that event is cancelled the dig fuctions returns before breaking the block. The actual "breaking" of the block is setting the block type id to 0, as done with "this.world.setTypeId(j, k, l, 0);"

 

------------------------------

 

Now lets look at similar code in the FTB computercraft:

 

 

if (!canBreakBlock(worldObj, newX, newY, newZ))
{
         return false;
}

 

..etc..

 

int blockID = worldObj.a(newX, newY, newZ);
worldObj.f(2001, newX, newY, newZ, blockID + worldObj.h(newX, newY, newZ) * 4096);
worldObj.e(newX, newY, newZ, 0);

 

 

Here is the canBreakBlock function:

 

protected boolean canBreakBlock(yc world, int x, int y, int z)
{
          int bid = world.a(x, y, z);
          amq block = amq.p[bid];
           if ((bid == 0) || (bid == amq.C.cm) || (block.m(world, x, y, z) <= -1.0F))
          {
                    return false;
           }
          return true;
}

 

 

-----------------

 

So you can see all the FTB computer craft does is check if the block is breakable, exists, and whatever amq.C.cm is. Never is there an event thrown where a third party plugin (such as any grief detection) can intercept and cancel and return the function before the breaking of the block, in this case I think the function "e" is some type of obfuscated name for "setTypeId"

 

 

I have not investigated how IC2 and other mods do it, but I suspect the same. In order to get these mods to stop griefing they have to throw an event for a thirdparty to cancel.  Three things can happen for this to work:

 

1.) Forge needs to make a BlockBreakEvent event and all the mods need to trigger this BlockBreakEvent with their fakePlayer (or owner's name), and prevent the breaking of a block if that event is cancelled in any way (such as by a anti-griefing plugin).

 

2.) The mods must trigger a PlayerInteractEvent (As I understand it, an alternative to bukkit's BlockBreakEvent but perhaps not as good?) with their fakePlayer (or owner's name), and prevent the breaking of a block if that event is cancelled in any way (such as by a anti-griefing plugin).

 

3) Each forge mod must be modified to check if bukkit support exists (via MCPC+ or the like) and if so, use Bukkit's BlockBreakEvent similar in the way it's done in Tekkit. (see tekkit CC code above).

 

 

 

Link to comment
Share on other sites

As I understand it, Feed the Beast mods do have fakeplayers they create but because the lack of a BreakBlockEvent in Forge they never trigger any event at all before they destroy the block. Perhaps it could be possible to convince/mod these mods to trigger a PlayerInteractEvent and then check if a plugin (Chunk Protection or any grief prevention) has cancelled that event, and then the machine will not break the the block.

 

This is how ComputerCraft in Tekkit works by using Bukkits BreakBlockEvent. Here is the code from the dig function (this is where blocks get broken):

 

Player fakePlayer = FakePlayer.getBukkitEntity(this.world, getTurtleName());
if (fakePlayer != null) {
         CraftWorld craftWorld = ((WorldServer)this.world).getWorld();
         CraftServer craftServer = ((WorldServer)this.world).getServer();
          BlockBreakEvent event = new BlockBreakEvent(craftWorld.getBlockAt(j, k, l), fakePlayer);
         craftServer.getPluginManager().callEvent(event);
          if (event.isCancelled()) {
                   return false;
          }
}

.. etc ..

 

Block block = Block.byId[i1];
this.world.triggerEffect(2001, j, k, l, block.id + (this.world.getData(j, k, l) << 12));
this.world.setTypeId(j, k, l, 0);

 

 

Note that it sends a BlockBreakEvent with the fakePlayer and then if that event is cancelled the dig fuctions returns before breaking the block. The actual "breaking" of the block is setting the block type id to 0, as done with "this.world.setTypeId(j, k, l, 0);"

 

------------------------------

 

Now lets look at similar code in the FTB computercraft:

 

 

if (!canBreakBlock(worldObj, newX, newY, newZ))
{
         return false;
}

 

..etc..

 

int blockID = worldObj.a(newX, newY, newZ);
worldObj.f(2001, newX, newY, newZ, blockID + worldObj.h(newX, newY, newZ) * 4096);
worldObj.e(newX, newY, newZ, 0);

 

 

Here is the canBreakBlock function:

 

protected boolean canBreakBlock(yc world, int x, int y, int z)
{
          int bid = world.a(x, y, z);
          amq block = amq.p[bid];
           if ((bid == 0) || (bid == amq.C.cm) || (block.m(world, x, y, z) <= -1.0F))
          {
                    return false;
           }
          return true;
}

 

 

-----------------

 

So you can see all the FTB computer craft does is check if the block is breakable, exists, and whatever amq.C.cm is. Never is there an event thrown where a third party plugin (such as any grief detection) can intercept and cancel and return the function before the breaking of the block, in this case I think the function "e" is some type of obfuscated name for "setTypeId"

 

 

I have not investigated how IC2 and other mods do it, but I suspect the same. In order to get these mods to stop griefing they have to throw an event for a thirdparty to cancel.  Three things can happen for this to work:

 

1.) Forge needs to make a BlockBreakEvent event and all the mods need to trigger this BlockBreakEvent with their fakePlayer (or owner's name), and prevent the breaking of a block if that event is cancelled in any way (such as by a anti-griefing plugin).

 

2.) The mods must trigger a PlayerInteractEvent (As I understand it, an alternative to bukkit's BlockBreakEvent but perhaps not as good?) with their fakePlayer (or owner's name), and prevent the breaking of a block if that event is cancelled in any way (such as by a anti-griefing plugin).

 

3) Each forge mod must be modified to check if bukkit support exists (via MCPC+ or the like) and if so, use Bukkit's BlockBreakEvent similar in the way it's done in Tekkit. (see tekkit CC code above).

 

 

 

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.

Announcements



×
×
  • Create New...

Important Information

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