mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 22:45:09 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -5,71 +5,68 @@ import noppes.npcs.api.handler.data.IProfileOptions;
|
||||
import noppes.npcs.constants.EnumProfileSync;
|
||||
|
||||
public class ProfileOptions implements IProfileOptions {
|
||||
public boolean enableOptions = false;
|
||||
public boolean enableOptions = false;
|
||||
|
||||
public EnumProfileSync cooldownControl = EnumProfileSync.Individual;
|
||||
public EnumProfileSync completeControl = EnumProfileSync.Individual;
|
||||
public EnumProfileSync completeControl = EnumProfileSync.Individual;
|
||||
|
||||
public void readFromNBT(NBTTagCompound compound)
|
||||
{
|
||||
// Party Management
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
// Party Management
|
||||
enableOptions = compound.getBoolean("EnableProfiles");
|
||||
if(enableOptions){
|
||||
if (enableOptions) {
|
||||
cooldownControl = EnumProfileSync.values()[compound.getInteger("CooldownControl")];
|
||||
completeControl = EnumProfileSync.values()[compound.getInteger("CompleteControl")];
|
||||
}
|
||||
else {
|
||||
if(compound.hasKey("CooldownControl")){
|
||||
} else {
|
||||
if (compound.hasKey("CooldownControl")) {
|
||||
compound.removeTag("CooldownControl");
|
||||
}
|
||||
if(compound.hasKey("CompleteControl")){
|
||||
compound.removeTag("CompleteControl");
|
||||
}
|
||||
if (compound.hasKey("CompleteControl")) {
|
||||
compound.removeTag("CompleteControl");
|
||||
}
|
||||
|
||||
cooldownControl = EnumProfileSync.Individual;
|
||||
completeControl = EnumProfileSync.Individual;
|
||||
}
|
||||
}
|
||||
}
|
||||
public NBTTagCompound writeToNBT()
|
||||
{
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setBoolean("EnableProfiles", enableOptions);
|
||||
if(enableOptions){
|
||||
compound.setInteger("CooldownControl", cooldownControl.ordinal());
|
||||
compound.setInteger("CompleteControl", completeControl.ordinal());
|
||||
}
|
||||
else {
|
||||
if(compound.hasKey("CooldownControl")){
|
||||
|
||||
public NBTTagCompound writeToNBT() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setBoolean("EnableProfiles", enableOptions);
|
||||
if (enableOptions) {
|
||||
compound.setInteger("CooldownControl", cooldownControl.ordinal());
|
||||
compound.setInteger("CompleteControl", completeControl.ordinal());
|
||||
} else {
|
||||
if (compound.hasKey("CooldownControl")) {
|
||||
compound.removeTag("CooldownControl");
|
||||
}
|
||||
if(compound.hasKey("CompleteControl")){
|
||||
compound.removeTag("CompleteControl");
|
||||
}
|
||||
}
|
||||
if (compound.hasKey("CompleteControl")) {
|
||||
compound.removeTag("CompleteControl");
|
||||
}
|
||||
}
|
||||
|
||||
return compound;
|
||||
return compound;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasProfileOptions() {
|
||||
return enableOptions;
|
||||
}
|
||||
public boolean hasProfileOptions() {
|
||||
return enableOptions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProfileOptions(boolean enable) {
|
||||
this.enableOptions = enable;
|
||||
}
|
||||
public void setProfileOptions(boolean enable) {
|
||||
this.enableOptions = enable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCooldownControl(int profileType) {
|
||||
if (profileType < 0 || profileType >= EnumProfileSync.values().length) {
|
||||
return;
|
||||
}
|
||||
this.cooldownControl = EnumProfileSync.values()[profileType];
|
||||
}
|
||||
public void setCooldownControl(int profileType) {
|
||||
if (profileType < 0 || profileType >= EnumProfileSync.values().length) {
|
||||
return;
|
||||
}
|
||||
this.cooldownControl = EnumProfileSync.values()[profileType];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCooldownControl(){
|
||||
public int getCooldownControl() {
|
||||
return this.cooldownControl.ordinal();
|
||||
}
|
||||
|
||||
@@ -82,7 +79,7 @@ public class ProfileOptions implements IProfileOptions {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCompleteControl(){
|
||||
public int getCompleteControl() {
|
||||
return this.completeControl.ordinal();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user