Discussion forum > Suggestions

Lava Buckets in Furnaces

<< < (3/9) > >>

Sugna:

--- Quote from: Morrison1996 on April 06, 2013, 11:59:35 am ---I don't think the problem is that we will run out of lava. The problem would be the increased amount of lava flow. Flowing lava causes more lag then stagnant lava.

--- End quote ---

You could always only be able to get lava buckets at the market for $100. Myabe

2468avc:
That could definitely work. Though maybe $125, we wouldn't want a noob going to the market saying "Hmm, lava... And I dont even have to go to the nether... Imma gonna buy! What!!!??? That was all my cash!!!??? Unfair!!!!!! (etc.)"

Edit: So... Do you think this will be added?

Do not double post - Merged.

theone7142:
Don't double post.

Anyways, this idea should be implemented IF two criteria are met.


1: Nothing more important is being worked on.

2: It is easy to code.

Chief149:
Basically to implement this:

1) Register a BlockPlaceEvent handler to the Opticraft server plugin (if not already done).
2) On the onBlockPlace method call add this:

public void onBlockPlace(BlockPlaceEvent bpEvent)
{
     if(bpEvent.getBlockPlaced().getType() ==  Material.STATIONARY_LAVA)
     {
          if(!bpEvent.getPlayer().hasPermission("some.override.permission.for.moderators")))
          {
               bpEvent.setCancelled(true);
          }
     }
}

Personally I would have preffered to combine the two IF statements into one using &&, but since the forum text editor was being wierd I found it to look nicer for viewing with two seperate statements.
Basically, on each and every block placement, the above method is called. Then we check if the block placed is STATIONARY_LAVA, or a lava source block which is what is placed by a filled lava bucket. If I'm wrong then simply change the Material.<material> part on the first IF statement.
If it is a lava block, then check to see if the player who placed the lava has the override permission (such as a moderator permission). Notice I have the ! in front of the hasPermission() call. For those who don't know how to program, that simply stands for if the player DOESNT have the permission. If not, then we set the event state to be cancelled, and Bukkit does the rest.

Add that to the opticraft plugin, and allow lava buckets to be used. That code will block lava placement, but not picking up lava. So long as we can fill a lava bucket, we can use it in a furnace. No harm can be done as long as players can't place the lava.

tiggy26668:

--- Quote from: Chief149 on April 13, 2013, 02:40:31 am ---Basically to implement this:

1) Register a BlockPlaceEvent handler to the Opticraft server plugin (if not already done).
2) On the onBlockPlace method call add this:

public void onBlockPlace(BlockPlaceEvent bpEvent)
{
     if(bpEvent.getBlockPlaced().getType() ==  Material.STATIONARY_LAVA)
     {
          if(!bpEvent.getPlayer().hasPermission("some.override.permission.for.moderators")))
          {
               bpEvent.setCancelled(true);
          }
     }
}

Personally I would have preffered to combine the two IF statements into one using &&, but since the forum text editor was being wierd I found it to look nicer for viewing with two seperate statements.
Basically, on each and every block placement, the above method is called. Then we check if the block placed is STATIONARY_LAVA, or a lava source block which is what is placed by a filled lava bucket. If I'm wrong then simply change the Material.<material> part on the first IF statement.
If it is a lava block, then check to see if the player who placed the lava has the override permission (such as a moderator permission). Notice I have the ! in front of the hasPermission() call. For those who don't know how to program, that simply stands for if the player DOESNT have the permission. If not, then we set the event state to be cancelled, and Bukkit does the rest.

Add that to the opticraft plugin, and allow lava buckets to be used. That code will block lava placement, but not picking up lava. So long as we can fill a lava bucket, we can use it in a furnace. No harm can be done as long as players can't place the lava.

--- End quote ---

lol you made the same mistake as cschurz  :P

what about lava that isn't stationary?  ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version