Trigger change object status through the API

  • Another thought for @red51. Would it be possible to give us the possibility to trigger a ChangeObjectStatus Event without the player interacting with an object?


    e.g.1 open a door through the API if a player does something else that I am going to monitor with my plugin (e.g. steps on a specific block, or enters a specific area, or places a specific item in a specific chest).


    e.g.2 turn on a furnace through the API when a specific condition (again monitored independently by my plugin) has been met (e.g. a specific number of ores has been placed at specific positions in the furnace)


    In general I think it would be a good idea to give access through the API to all the objects e.g. placed furnaces/doors/etc. Would make a good starting point for some fun plugins ;)

  • so like if a player goes to open a chest the door next to him opens lol nice idea


    i guess all things that are able to have there state changed should be logged in the database like chests are


    i guess something like setDoor(id, true) true = open false = closed setFurnace(id, true) true = on false = off i guess this also could be the start of adding power to the game.

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • so like if a player goes to open a chest the door next to him opens lol nice idea


    i guess all things that are able to have there state changed should be logged in the database like chests are


    i guess something like setDoor(id, true) true = open false = closed setFurnace(id, true) true = on false = off i guess this also could be the start of adding power to the game.

    I know the objects are logged in the world database with their current state but since the game uses the cached version of the database to control them I cannot just use an sql query to change the state, it doesn't work :(


    Thus we need some methods as you described above :)

  • Sounds like a good idea, I'll put that on our list :)
    But since objects don't have a unique id, it will be necessary to provide the position and rotation of the object so the server knows which object you want to change

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!