1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Why this code don't works with the furnace and the chest?

Discussion in 'Skript' started by PantherBoy, Jun 28, 2018.

Thread Status:
Not open for further replies.
  1. PantherBoy

    PantherBoy Well-Known Member

    Joined:
    Jul 20, 2017
    Messages:
    72
    Likes Received:
    0
    Skript Version: 2.2 V8B
    Minecraft Version:1.8.8

    ---
    Full Code:


    Code (Skript):
    1.  
    2. On place:
    3.     if player is holding block:
    4.         if player do not have the permission "Mars.build":
    5.             if block above is air:
    6.                 cancel event
    7.             else if block above is slab:7:
    8.                 if event-block is not a chest, crafting table,furnace , anvil or non-burning furnace:
    9.                     cancel event
    10.             else:
    11.                 cancel event
    12.  
    Errors on Reload: No errors

    Console Errors:No error

    Other Useful Info: If I place down an anvil in east facing, the code don't work, and I can put it down anywhere! And the furnace and the chest can be placed anywhere. The workbench is works fine... Why? How can i repair the code? What is the problem?


    Addons using (including versions):
    No addons

     
  2. Best Answer:
    Post #4 by ShaneBee, Jun 28, 2018
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    im not sure if this is the reason, but
    "if player is holding block:" is not a thing

    EDIT: never mind did a test and that part works

    EDIT: ok, so i did some testing.... its because a chest and an anvil are not considered blocks
     
  4. PantherBoy

    PantherBoy Well-Known Member

    Joined:
    Jul 20, 2017
    Messages:
    72
    Likes Received:
    0
    And how can I solve the problem?
    And what about with the furnace?
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,106
    Likes Received:
    150
    just remove your line "if player is holding block"
     
    • Friendly Friendly x 1
  6. PantherBoy

    PantherBoy Well-Known Member

    Joined:
    Jul 20, 2017
    Messages:
    72
    Likes Received:
    0
    Thanks!
     
Thread Status:
Not open for further replies.
Loading...