Bukkit Player removeResourcePack? -


i know how send specific resourcepack player on server. work multiple small minigames servers , 1 of minigames needs resourcepack send resourcepack function:

p.setresourcepack("url"); 

but if player sent lobby-server, resourcepack not removed automatically. i'd remove resourcepack because if player plays game might confused special textures. tryed send "null" resourcepack

p.setresourcepack(null); 

but throws exception.

http://hastebin.com/gojuqesafa.profile

so know solution sending him default-resourcepack?

i think best way set players resource pack default, this:

first of all, create new folder called default (or whatever).

then go .minecraft/versions open folder version of minecraft plugin supports, open jar file program winrar, , copy assets folder default texture pack folder created. create file called pack.mcmeta these contents:

{   "pack": {     "pack_format": 1,     "description": "default texture pack"   } } 

afterwards, create new image (size should preferrably 64x64 or 128x128) , make black, doesn't matter, upload mediafire or site , file link (for mediafire, go link provide with, right click green button , press copy link location).

once done, in code do:

p.setresourcepack("url default texture pack"); 

this not set players texture pack had before, set default minecraft texture pack


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -