prefix: '&d[&bRandomItem&d] '
item:
save: '{0}&eSaved &b{1} &5&lX1 &esuccessfully!'
get: '{0}&eYou have got &a{1} &5&lX{2}&e!'
give: '{0}&eYou have given &a{2} &5&lX{3} &eto player &6{1}&e!'
drop: '{0}&eYou let the random item &6{1} &5&lX{2} &edrop in the world &a{3} &e: &b{4}&c,&b{5}&c,&b{6}'
no-permission: '{0}&cYou don t have the permission to do this!'
only-player: '{0}&cThis command can only be used by players!'
valid:
x-y-z: '{0}&cPlease check that the X, Y, Z coordinates you entered must be numeric!'
number: '{0}&cThe page you entered must be numeric!'
world: '{0}&cThe world &b{1} &cdoesn t exist!'
item: '{0}&cThe item &b{1} &cdoesn t exist!'
player: '{0}&cThe player &b{1} &cdoesn t exist!'
save: '{0}&cThe &b{1} &ccan t be saved!'
id: '{0}&cID &b{1} &cdoesn t exist! Skip!'
network: '{0}&cFailed to link to server! Please check your network!'
command: '{0}&cWrong sub command!'
list:
value-of-one-page: 10
up: '&d&l&m======================================='
format: '&a{1}. &b -> &6{2} &5- &b{3}'
page: ' &e{1}&5/&e{2} '
left: ' &b<-'
right: '&b-> '
down: '&d&l&m======================================='
reload:
default: '{0}&eReloaded successfully!'
config: '{0}&eFile &d&lconfig.yml &eupdated,And it has been loaded automatically!'
check-version:
legacy: '{0}&cRandomItem has a new version &6 {1} &c, please go to&e https://www.spigotmc.org/resources/88226/ &cto download the latest version!'
latest: '{0}&aYour RandomItem is the latest version!'
commands:
- '&d&l&m================================================'
- '&b/randomitem get [Item ID] (Amount Formula) (Chance Formula) (Is Same) (Point Data) '
- ' &eTo get a RandomItem&e.'
- '&b/randomitem give [Player Name] [Item ID] (Amount Formula) (Chance Formula) (Is Same) (Point Data) '
- ' &eTo give somebody a RandomItem&e.'
- '&b/randomitem list (Page) '
- ' &eShow the RandomItem list.'
- '&b/randomitem save [Item ID] [Path] '
- ' &eTo save the item that in your hand.'
- '&b/randomitem drop [Player Name] [Item ID] [Amount Formula] [Chance Formula] [Is Same] [World Name] [x] [y] [z] '
- ' &eTo drop RandomItem in somewhere.'
- '&b/randomitem reload '
- ' &eTo reload the plugin&e. '
- '&d[]is a required , () is optional . &cParameters must be entered in sequence'
- 'Formulas support for PAPI and the four fundamental operations of arithmetic,Chance 0~1,Is Same -> weather or not generating same item.'
- '&d(Point Data)’s format: &a[Random Section ID:Value,Random Section ID:Value]'
- '&7The value of the string section is filled with the ID of its substring section'
- '&7You can also use the format of &a[String Section ID:A,B,C]&7 to let only the three substrings A,B,C participate in the random weighting.'
- '&d&l&m================================================'
script:
type: javascript
script: |
var id = <quality.data-json>.id;
switch(id){
case "Rough":
return 1;
case "Normal":
return 2;
case "Fine":
return 3;
case "Excellent":
return 4;
case "Epic":
return 5;
case "Legendary":
return 6;
default:
return 0;
}