Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void sendFor(OfflinePlayer paramOfflinePlayer) {
- Set<String> keys = this.section.getKeys(false);
- double weight = 0;
- for (String str1 : keys) {
- weight += this.section.getDouble(str1 + ".chance");
- }
- for (String str1 : keys) {
- double d = this.section.getDouble(str1 + ".chance");
- List localList = this.section.getStringList(str1 + ".command");
- if (rdm.nextDouble() < (d / weight)) {
- weight = weight - d;
- for (String str2 : localList)
- Bukkit.dispatchCommand(Bukkit.getConsoleSender(), PinataParty.placeholderParser.parse(paramOfflinePlayer, str2));
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement