On some hostings, running native binary is limited, so the conversion may not work. If this is the case, leave the encoder.use false as in the default config and use ogg files (alternative conversion method may be added in the future)
When used with backward compatibility plugins, the maximum size of a resource pack should not be higher than the maximum size of a resource pack on the minimum version that can be joined to the server.
It can give out the IP of the server on which it is located. Since the resourcepack file server is located locally.
To use the adding mode to an existing resource pack, place the resource pack in the "Music" directory and rename it. The name of the zip file must be the same as the name of the playlist directory.
Music stops on respawn or world change
Installation:
Place amusic_bukkit-0.15.jar in /plugins/ directory
Restart server
Replace 'host' option in 'config.yml' to external server ip
Open or change port in option 'port'
Restart server
Maximum resourcepack size:
1.7.10 - 1.15.2 : 50MiB (52428800 bytes)
1.16 - 1.17.1: 100MiB (104857600 bytes)
1.18+ : 250MiB (262144000 bytes)
Repeat types:
repeatone - repeat one sound
repeatall - repeat all in cycle
playone - do not repeat
playall - play until playlist end
random - random sound from playlist
Commands:
/loadmusic <playername> <playlistname> - convet(if enabled), pack,load playlist(resourcepack) to player
uploaderserver:
use: false
host: http://127.0.0.1:25532/
#External server ip or hostname #ip: 127.0.0.1 port: 25532
#Resourcepack uploader server port backlog: 50
#Maximum length of the queue of incoming connections strictaccess: true
timeout: 600000
limit: 262144000
server:
host: http://127.0.0.1:25530/
#External server ip or hostname #ip: 127.0.0.1 port: 25530
#Resourcepack file server port backlog: 50
#Maximum length of the queue of incoming connections strictaccess: true
#waitacception: true #ResourcePack Status accepted need to access server (if blocked using recomended value 'true', if 1.7.10 used set it to 'false') tokensalt: PlaceHereARandomBase64StringIfClientCacheEnabled
resource:
processpack: true
#If false, resourcepack packing disabled cache:
server: true
#If true resourcepack cached on server client: true
#If true resourcepack cached on client (Max 10), resets if host, port, tokensalt, player uuid changed) encoder:
use: false
ffmpegbinary: ffmpeg
#Path to ffmpeg binary bitrate: 64000
channels: 2
samplingrate: 44100
async: true
API:
Code (Java):
//Should be used only if AMusic used as plugin AMusic api
= AMusic.
API();//GET DEFAULT INSTANCE
//May be used to add amusic core into other plugin, or create multiple independent AMusic instances AMusic api
=new AMusic
(ConfigOptions configoptions, SoundSource
<?> source, PackSender packsender, SoundStarter soundstarter, SoundStopper soundstopper, ConcurrentHashMap
<Object,InetAddress
> playerips
); api.
enable();//starts threads api.
disable();//stops threads
//For all operating modes api.
getPlaylists();//get list of already packed playlists(resourcepacks) api.
getPlaylistSoundnames(String playlistname
);//get list of sounds in playlist "playlistname" api.
getPlaylistSoundnames(UUID playeruuid
);//get list of sounds loaded to player with uuid "playeruuid" api.
getPlaylistSoundlengths(String playlistname
);//get list of sounds length in playlist "playlistname" api.
getPlaylistSoundlengths(UUID playeruuid
);//get list of sounds length loaded to player with uuid "playeruuid" api.
loadPack(UUID
[] playeruuid,
String name,
boolean update, StatusReport statusreport
);//pack, convert(if enabled), send playlist(resourcepack) to player with uuid "playeruuid" (if playeruuid null not send) api.
getPackName(UUID playeruuid
);//get loaded playlist(resourcepack) name, of player with uuid "playeruuid" api.
setRepeatMode(UUID playeruuid, RepeatType repeattype
);//set repeat mode "repeattype" to player with uuid "playeruuid" api.
stopSound(UUID playeruuid
);//stop sound to player with uuid "playeruuid" api.
playSound(UUID playeruuid,
String name
);//start sound "name" to player with uuid "playeruuid" api.
getPlayingSoundName(UUID playeruuid
);//get currently playing sound of player with uuid "playeruuid" api.
getPlayingSoundSize(UUID playeruuid
);//get currently playing sound size of player with uuid "playeruuid" api.
getPlayingSoundRemain(UUID playeruuid
);//get currently playing sound remaining time of player with uuid "playeruuid" api.
openUploadSession(String playlistname
);//open upload session. api.
getUploadSessions();//get upload sessions. api.
closeUploadSession(UUID token
);//close upload session