Solved 1.13.1 - New Trap Door material is "Air"

Discussion in 'Spigot Plugin Development' started by Psychlist1972, Oct 12, 2018 at 12:22 PM.

Thread Status:
Not open for further replies.
  1. Using the latest snapshot API set. I'm working to update a plugin. In that, I need to look at the material for a clicked Openable. For doors and gates, it seems to work fine. For oak trap doors, works fine. All the new trap doors have a getClickedBlock().getBlockData.getMaterial() value of "AIR". They do pass the test for being an instanceof Openable, though.

    It's like I am seeing the old 1.12 material values or something. I would have expected one of the new material types like OAK_TRAPDOOR not TRAP_DOOR and AIR.

    Bug? Am I doing something wrong?

    Pete
     
  2. Did you added api-version: version to your plugin.yml
     
    • Winner Winner x 1
  3. No, I hadn't. I realize I never had that in the yml because it "just worked" with older versions. Thanks.

    The docs on that say that "1.13" is the only special value. I'll try this in a bit. Not sure if I should use "1.13" or "1.13.1" or the actual version: "1.13.1-R0.1-SNAPSHOT"

    Pete
     
  4. Setting to 1.13 did it! Still curious if I should use the full API version, or if the 1.13 entry is enough.

    Thanks again

    Pete
     
  5. 1.13 is just the general identifier to say your plugin uses the non-legacy api ( 1.13 and upwards ).

    So you are fine using 1.13.

    This will probablly only change again if a massive overhaul of the material system is done ever again (but I doubt it). Make sure to mark your thread and solved and lock it if applicable!
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page