mirror of
https://github.com/xoo0524tw/OpenHBedwars.git
synced 2026-12-05 22:16:02 +02:00
Initial commit: HBedWars v1.1-ARANDANO source and Maven/IDEA setup
This commit is contained in:
commit
42e359bd5f
484 files changed
+72289
No files matched your search
@@ -0,0 +1,123 @@
|
||||
package com.axeelheaven.hbedwars.api.groups;
|
||||
|
||||
import com.axeelheaven.hbedwars.BedWars;
|
||||
import com.axeelheaven.hbedwars.configuration.HConfiguration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class Group {
|
||||
private final double pointsWin;
|
||||
private final double experienceKill;
|
||||
private ItemStack[] inventory;
|
||||
private final double pointsKill;
|
||||
private final int teamSize;
|
||||
private final double pointsFinalKill;
|
||||
private ItemStack[] armor;
|
||||
private final String name;
|
||||
private final double experienceFinalKill;
|
||||
private final double experienceWin;
|
||||
private final HashMap<String, List<String>> commands = new HashMap<>();
|
||||
|
||||
public void setArmor(ItemStack[] var1) {
|
||||
this.armor = var1;
|
||||
}
|
||||
|
||||
public double getExperienceKill() {
|
||||
return this.experienceKill;
|
||||
}
|
||||
|
||||
public ItemStack[] getArmor() {
|
||||
return this.armor;
|
||||
}
|
||||
|
||||
public HashMap<String, List<String>> getCommands() {
|
||||
return this.commands;
|
||||
}
|
||||
|
||||
public double getExperienceWin() {
|
||||
return this.experienceWin;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public double getPointsFinalKill() {
|
||||
return this.pointsFinalKill;
|
||||
}
|
||||
|
||||
public void setInventory(ItemStack[] var1) {
|
||||
this.inventory = var1;
|
||||
}
|
||||
|
||||
public Group(BedWars var1, String var2, HConfiguration var3) {
|
||||
this.name = var2;
|
||||
this.teamSize = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".team_size")));
|
||||
this.pointsKill = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".points.kill")));
|
||||
this.pointsFinalKill = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".points.final_kill")));
|
||||
this.pointsWin = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".points.win")));
|
||||
this.experienceKill = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".experience.kill")));
|
||||
this.experienceFinalKill = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".experience.final_kill")));
|
||||
this.experienceWin = var3.getInt(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".experience.win")));
|
||||
if (var3.isSet(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".contents.inventory")))) {
|
||||
this.inventory = var1.getUtil()
|
||||
.itemStackArrayFromBase64(var3.getString(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".contents.inventory"))));
|
||||
} else {
|
||||
this.inventory = null;
|
||||
}
|
||||
|
||||
if (var3.isSet(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".contents.armor")))) {
|
||||
this.armor = var1.getUtil()
|
||||
.itemStackArrayFromBase64(var3.getString(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".contents.armor"))));
|
||||
} else {
|
||||
this.armor = null;
|
||||
}
|
||||
|
||||
if (var3.isConfigurationSection(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".commands")))) {
|
||||
for (String var5 : var3.getConfigurationSection(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".commands"))).getKeys(false)) {
|
||||
if (!this.commands.containsKey(var5)) {
|
||||
this.commands.put(var5, new ArrayList<>());
|
||||
}
|
||||
|
||||
this.commands
|
||||
.get(var5)
|
||||
.addAll(var3.getStringList(String.valueOf(new StringBuilder().append("groups.").append(var2).append(".commands.").append(var5))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double getPointsWin() {
|
||||
return this.pointsWin;
|
||||
}
|
||||
|
||||
public double getExperienceFinalKill() {
|
||||
return this.experienceFinalKill;
|
||||
}
|
||||
|
||||
public ItemStack[] getInventory() {
|
||||
return this.inventory;
|
||||
}
|
||||
|
||||
public int getTeamSize() {
|
||||
return this.teamSize;
|
||||
}
|
||||
|
||||
public Group(String var1, int var2, double var3, double var5, double var7, double var9, double var11, double var13, ItemStack[] var15, ItemStack[] var16) {
|
||||
this.name = var1;
|
||||
this.teamSize = var2;
|
||||
this.pointsKill = var3;
|
||||
this.pointsFinalKill = var5;
|
||||
this.pointsWin = var7;
|
||||
this.experienceKill = var9;
|
||||
this.experienceFinalKill = var11;
|
||||
this.experienceWin = var13;
|
||||
this.inventory = var15;
|
||||
this.armor = var16;
|
||||
}
|
||||
|
||||
public double getPointsKill() {
|
||||
return this.pointsKill;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user