diff options
author | madmaxoft <github@xoft.cz> | 2014-02-28 15:41:46 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-28 15:41:46 +0100 |
commit | d97363a1b39fd94a77bb84a4d9732ab4f46b08b7 (patch) | |
tree | d60dc5b5a8cee7995fd11671267953e2e40fec4d | |
parent | Moved common cGroupManager code to a separate function. (diff) | |
download | cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.tar cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.tar.gz cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.tar.bz2 cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.tar.lz cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.tar.xz cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.tar.zst cuberite-d97363a1b39fd94a77bb84a4d9732ab4f46b08b7.zip |
-rw-r--r-- | MCServer/Plugins/APIDump/Classes/BlockEntities.lua | 6 | ||||
-rw-r--r-- | src/BlockEntities/JukeboxEntity.h | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua index cf258160c..61a8e8d22 100644 --- a/MCServer/Plugins/APIDump/Classes/BlockEntities.lua +++ b/MCServer/Plugins/APIDump/Classes/BlockEntities.lua @@ -196,9 +196,11 @@ World:ForEachChestInChunk(Player:GetChunkX(), Player:GetChunkZ(), Inherits = "cBlockEntity", Functions = { - EjectRecord = { Params = "", Return = "", Notes = "Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0)" }, + EjectRecord = { Params = "", Return = "bool", Notes = "Ejects the current record as a {{cPickup|pickup}}. No action if there's no current record. To remove record without generating the pickup, use SetRecord(0). Returns true if pickup ejected." }, GetRecord = { Params = "", Return = "number", Notes = "Returns the record currently present. Zero for no record, E_ITEM_*_DISC for records." }, - PlayRecord = { Params = "", Return = "", Notes = "Plays the currently present record. No action if there's no current record." }, + IsPlayingRecord = { Params = "", Return = "bool", Notes = "Returns true if the jukebox is playing a record." }, + IsRecordItem = { Params = "ItemType", Return = "bool", Notes = "Returns true if the specified item is a record that can be played." }, + PlayRecord = { Params = "RecordItemType", Return = "bool", Notes = "Plays the specified Record. Return false if the parameter isn't a playable Record (E_ITEM_XXX_DISC). If there is a record already playing, ejects it first." }, SetRecord = { Params = "number", Return = "", Notes = "Sets the currently present record. Use zero for no record, or E_ITEM_*_DISC for records." }, }, }, -- cJukeboxEntity diff --git a/src/BlockEntities/JukeboxEntity.h b/src/BlockEntities/JukeboxEntity.h index 01ce52494..3d1d604f7 100644 --- a/src/BlockEntities/JukeboxEntity.h +++ b/src/BlockEntities/JukeboxEntity.h @@ -38,10 +38,11 @@ public: int GetRecord(void); void SetRecord(int a_Record); - /** Play a Record. Return false, when a_Record isn't a Record */ + /** Plays the specified Record. Return false if a_Record isn't a playable Record (E_ITEM_XXX_DISC). + If there is a record already playing, ejects it first. */ bool PlayRecord(int a_Record); - /** Ejects the currently held record as a pickup. Return false when no record inserted. */ + /** Ejects the currently held record as a pickup. Return false when no record had been inserted. */ bool EjectRecord(void); /** Is in the Jukebox a Record? */ |