-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
371 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,107 @@ | ||
package be4rjp.sclat.data; | ||
|
||
import org.bukkit.inventory.ItemStack; | ||
|
||
/** | ||
* | ||
* @author Be4rJP | ||
*/ | ||
public class MainWeapon { | ||
private String WeaponName; | ||
private String WeaponType; | ||
private ItemStack weaponitem; | ||
private double random; | ||
private int distancetick; | ||
private double shootspeed; | ||
private int shoottick; | ||
private int paintrandom; | ||
private double maxpaintdis; | ||
private float needink; | ||
private double damage; | ||
private int maxcharge; | ||
private int rollershootquantity; | ||
private float UsingWalkSpeed; | ||
private int rollerWidth; | ||
private boolean Tatehuri; | ||
private double rollerdamage; | ||
private float rollerneedink; | ||
|
||
|
||
|
||
public MainWeapon(String weaponname){this.WeaponName = weaponname;} | ||
|
||
public String getWeaponType(){return this.WeaponType;} | ||
|
||
public ItemStack getWeaponIteamStack(){return this.weaponitem;} | ||
|
||
public double getRandom(){return random;} | ||
|
||
public int getDistanceTick(){return distancetick;} | ||
|
||
public double getShootSpeed(){return shootspeed;} | ||
|
||
public int getShootTick(){return shoottick;} | ||
|
||
public int getPaintRandom(){return this.paintrandom;} | ||
|
||
public double getMaxPaintDis(){return this.maxpaintdis;} | ||
|
||
public float getNeedInk(){return this.needink;} | ||
|
||
public double getDamage(){return this.damage;} | ||
|
||
public int getMaxCharge(){return this.maxcharge;} | ||
|
||
public int getRollerShootQuantity(){return this.rollershootquantity;} | ||
|
||
public float getUsingWalkSpeed(){return this.UsingWalkSpeed;} | ||
|
||
public int getRollerWidth(){return this.rollerWidth;} | ||
|
||
public boolean getCanTatehuri(){return this.Tatehuri;} | ||
|
||
public double getRollerDamage(){return this.rollerdamage;} | ||
|
||
public float getRollerNeedInk(){return this.rollerneedink;} | ||
|
||
|
||
public void setWeaponType(String WT){this.WeaponType = WT;} | ||
|
||
public void setWeaponItemStack(ItemStack is){this.weaponitem = is;} | ||
|
||
public void setRandom(double random){this.random = random;} | ||
|
||
public void setDistanceTick(int distick){this.distancetick = distick;} | ||
|
||
public void setShootSpeed(double speed){this.shootspeed = speed;} | ||
|
||
public void setShootTick(int shoottick){this.shoottick = shoottick;} | ||
|
||
public void setPaintRandom(int r){this.paintrandom = r;} | ||
|
||
public void setMaxPaintDis(double max){this.maxpaintdis = max;} | ||
|
||
public void setNeedInk(float ink){this.needink = ink;} | ||
|
||
public void setDamage(double damage){this.damage = damage;} | ||
|
||
public void setMaxCharge(int max){this.maxcharge = max;} | ||
|
||
public void setRollerShootQuantity(int i){this.rollershootquantity = i;} | ||
|
||
public void setUsingWalkSpeed(float f){this.UsingWalkSpeed = f;} | ||
|
||
public void setRollerWidth(int w){this.rollerWidth = w;} | ||
|
||
public void setCanTatehuri(boolean t){this.Tatehuri = t;} | ||
|
||
public void setRollerDamage(double damage){this.rollerdamage = damage;} | ||
|
||
public void setRollerNeedInk(float ink){this.rollerneedink = ink;} | ||
|
||
} | ||
package be4rjp.sclat.data; | ||
|
||
import org.bukkit.inventory.ItemStack; | ||
|
||
/** | ||
* | ||
* @author Be4rJP | ||
*/ | ||
public class MainWeapon { | ||
private String WeaponName; | ||
private String WeaponType; | ||
private ItemStack weaponitem; | ||
private double random; | ||
private int distancetick; | ||
private double shootspeed; | ||
private int shoottick; | ||
private int paintrandom; | ||
private double maxpaintdis; | ||
private float needink; | ||
private double damage; | ||
private int maxcharge; | ||
private int rollershootquantity; | ||
private float UsingWalkSpeed; | ||
private int rollerWidth; | ||
private boolean Tatehuri; | ||
private double rollerdamage; | ||
private float rollerneedink; | ||
private boolean scope; | ||
|
||
|
||
|
||
public MainWeapon(String weaponname){this.WeaponName = weaponname;} | ||
|
||
public String getWeaponType(){return this.WeaponType;} | ||
|
||
public ItemStack getWeaponIteamStack(){return this.weaponitem;} | ||
|
||
public double getRandom(){return random;} | ||
|
||
public int getDistanceTick(){return distancetick;} | ||
|
||
public double getShootSpeed(){return shootspeed;} | ||
|
||
public int getShootTick(){return shoottick;} | ||
|
||
public int getPaintRandom(){return this.paintrandom;} | ||
|
||
public double getMaxPaintDis(){return this.maxpaintdis;} | ||
|
||
public float getNeedInk(){return this.needink;} | ||
|
||
public double getDamage(){return this.damage;} | ||
|
||
public int getMaxCharge(){return this.maxcharge;} | ||
|
||
public int getRollerShootQuantity(){return this.rollershootquantity;} | ||
|
||
public float getUsingWalkSpeed(){return this.UsingWalkSpeed;} | ||
|
||
public int getRollerWidth(){return this.rollerWidth;} | ||
|
||
public boolean getCanTatehuri(){return this.Tatehuri;} | ||
|
||
public double getRollerDamage(){return this.rollerdamage;} | ||
|
||
public float getRollerNeedInk(){return this.rollerneedink;} | ||
|
||
public boolean getScope(){return this.scope;} | ||
|
||
|
||
public void setWeaponType(String WT){this.WeaponType = WT;} | ||
|
||
public void setWeaponItemStack(ItemStack is){this.weaponitem = is;} | ||
|
||
public void setRandom(double random){this.random = random;} | ||
|
||
public void setDistanceTick(int distick){this.distancetick = distick;} | ||
|
||
public void setShootSpeed(double speed){this.shootspeed = speed;} | ||
|
||
public void setShootTick(int shoottick){this.shoottick = shoottick;} | ||
|
||
public void setPaintRandom(int r){this.paintrandom = r;} | ||
|
||
public void setMaxPaintDis(double max){this.maxpaintdis = max;} | ||
|
||
public void setNeedInk(float ink){this.needink = ink;} | ||
|
||
public void setDamage(double damage){this.damage = damage;} | ||
|
||
public void setMaxCharge(int max){this.maxcharge = max;} | ||
|
||
public void setRollerShootQuantity(int i){this.rollershootquantity = i;} | ||
|
||
public void setUsingWalkSpeed(float f){this.UsingWalkSpeed = f;} | ||
|
||
public void setRollerWidth(int w){this.rollerWidth = w;} | ||
|
||
public void setCanTatehuri(boolean t){this.Tatehuri = t;} | ||
|
||
public void setRollerDamage(double damage){this.rollerdamage = damage;} | ||
|
||
public void setRollerNeedInk(float ink){this.rollerneedink = ink;} | ||
|
||
public void setScope(boolean is){this.scope = is;} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,68 @@ | ||
|
||
package be4rjp.sclat.manager; | ||
|
||
import static be4rjp.sclat.Main.conf; | ||
import be4rjp.sclat.data.DataMgr; | ||
import be4rjp.sclat.data.MainWeapon; | ||
import org.bukkit.Material; | ||
import org.bukkit.inventory.ItemStack; | ||
import org.bukkit.inventory.meta.ItemMeta; | ||
|
||
/** | ||
* | ||
* @author Be4rJP | ||
*/ | ||
public class MainWeaponMgr { | ||
public synchronized static void SetupMainWeapon(){ | ||
for (String weaponname : conf.getWeaponConfig().getConfigurationSection("MainWeapon").getKeys(false)){ | ||
String WeaponType = conf.getWeaponConfig().getString("MainWeapon." + weaponname + ".WeaponType"); | ||
Material WeaponMaterial = Material.getMaterial(conf.getWeaponConfig().getString("MainWeapon." + weaponname + ".WeaponMaterial")); | ||
double random = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".ShootRandom"); | ||
int distick = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".ShootDistance"); | ||
double shootspeed = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".ShootSpeed"); | ||
int shoottick = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".ShootTick"); | ||
int paintrandom = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".PaintRandom"); | ||
double maxpaintdis = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".MaxPaintDistance"); | ||
float needink = (float)conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".NeedInk"); | ||
double damage = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".Damage"); | ||
int maxcharge = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".MaxCharge"); | ||
int rollershootQuantity = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".RollerShootQuantity"); | ||
float usinwalkspeed = (float)conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".UsingWalkSpeed"); | ||
int rollerWidth = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".RollerWidth"); | ||
boolean tatehuri = conf.getWeaponConfig().getBoolean("MainWeapon." + weaponname + ".RollerTatehuri"); | ||
double rollerdamage = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".RollerDamage"); | ||
float rollerneedink = (float)conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".RollerNeedInk"); | ||
|
||
|
||
MainWeapon mw = new MainWeapon(weaponname); | ||
mw.setWeaponType(WeaponType); | ||
ItemStack is = new ItemStack(WeaponMaterial); | ||
ItemMeta itemMeta = is.getItemMeta(); | ||
itemMeta.setDisplayName(weaponname); | ||
is.setItemMeta(itemMeta); | ||
mw.setWeaponItemStack(is); | ||
mw.setRandom(random); | ||
mw.setDistanceTick(distick); | ||
mw.setShootSpeed(shootspeed); | ||
mw.setShootTick(shoottick); | ||
mw.setPaintRandom(paintrandom); | ||
mw.setMaxPaintDis(maxpaintdis); | ||
mw.setNeedInk(needink); | ||
mw.setDamage(damage); | ||
mw.setMaxCharge(maxcharge); | ||
mw.setRollerShootQuantity(rollershootQuantity); | ||
mw.setUsingWalkSpeed(usinwalkspeed); | ||
mw.setRollerWidth(rollerWidth); | ||
mw.setRollerDamage(rollerdamage); | ||
mw.setRollerNeedInk(rollerneedink); | ||
mw.setCanTatehuri(tatehuri); | ||
DataMgr.setMainWeapon(weaponname, mw); | ||
} | ||
} | ||
} | ||
|
||
package be4rjp.sclat.manager; | ||
|
||
import static be4rjp.sclat.Main.conf; | ||
import be4rjp.sclat.data.DataMgr; | ||
import be4rjp.sclat.data.MainWeapon; | ||
import org.bukkit.Material; | ||
import org.bukkit.inventory.ItemStack; | ||
import org.bukkit.inventory.meta.ItemMeta; | ||
|
||
/** | ||
* | ||
* @author Be4rJP | ||
*/ | ||
public class MainWeaponMgr { | ||
public synchronized static void SetupMainWeapon(){ | ||
for (String weaponname : conf.getWeaponConfig().getConfigurationSection("MainWeapon").getKeys(false)){ | ||
String WeaponType = conf.getWeaponConfig().getString("MainWeapon." + weaponname + ".WeaponType"); | ||
Material WeaponMaterial = Material.getMaterial(conf.getWeaponConfig().getString("MainWeapon." + weaponname + ".WeaponMaterial")); | ||
double random = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".ShootRandom"); | ||
int distick = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".ShootDistance"); | ||
double shootspeed = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".ShootSpeed"); | ||
int shoottick = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".ShootTick"); | ||
int paintrandom = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".PaintRandom"); | ||
double maxpaintdis = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".MaxPaintDistance"); | ||
float needink = (float)conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".NeedInk"); | ||
double damage = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".Damage"); | ||
int maxcharge = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".MaxCharge"); | ||
int rollershootQuantity = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".RollerShootQuantity"); | ||
float usinwalkspeed = (float)conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".UsingWalkSpeed"); | ||
int rollerWidth = conf.getWeaponConfig().getInt("MainWeapon." + weaponname + ".RollerWidth"); | ||
boolean tatehuri = conf.getWeaponConfig().getBoolean("MainWeapon." + weaponname + ".RollerTatehuri"); | ||
double rollerdamage = conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".RollerDamage"); | ||
float rollerneedink = (float)conf.getWeaponConfig().getDouble("MainWeapon." + weaponname + ".RollerNeedInk"); | ||
|
||
|
||
|
||
MainWeapon mw = new MainWeapon(weaponname); | ||
mw.setWeaponType(WeaponType); | ||
ItemStack is = new ItemStack(WeaponMaterial); | ||
ItemMeta itemMeta = is.getItemMeta(); | ||
itemMeta.setDisplayName(weaponname); | ||
is.setItemMeta(itemMeta); | ||
mw.setWeaponItemStack(is); | ||
mw.setRandom(random); | ||
mw.setDistanceTick(distick); | ||
mw.setShootSpeed(shootspeed); | ||
mw.setShootTick(shoottick); | ||
mw.setPaintRandom(paintrandom); | ||
mw.setMaxPaintDis(maxpaintdis); | ||
mw.setNeedInk(needink); | ||
mw.setDamage(damage); | ||
mw.setMaxCharge(maxcharge); | ||
mw.setRollerShootQuantity(rollershootQuantity); | ||
mw.setUsingWalkSpeed(usinwalkspeed); | ||
mw.setRollerWidth(rollerWidth); | ||
mw.setRollerDamage(rollerdamage); | ||
mw.setRollerNeedInk(rollerneedink); | ||
mw.setCanTatehuri(tatehuri); | ||
|
||
if(conf.getWeaponConfig().contains("MainWeapon." + weaponname + ".Scope")) | ||
mw.setScope(conf.getWeaponConfig().getBoolean("MainWeapon." + weaponname + ".Scope")); | ||
|
||
|
||
DataMgr.setMainWeapon(weaponname, mw); | ||
} | ||
} | ||
} |
Oops, something went wrong.