Skip to content

Commit

Permalink
Anti screenshot, Rename buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingThumb committed Dec 13, 2019
1 parent 9e7eaea commit 451678d
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ eclipse

# idea
out
classes
*.ipr
*.iws
*.iml
Expand All @@ -24,4 +23,4 @@ build
run
!LICENSE
!README.*
!.gitignore
!.gitignore
50 changes: 50 additions & 0 deletions src/main/java/xyz/risingthumb/iff/classes/Group.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package xyz.risingthumb.iff.classes;

import java.util.ArrayList;
import java.util.List;

public class Group {
private List<GroupPerson> persons;
private String prefix = "XYZ";

public Group() {
this.persons = new ArrayList<GroupPerson>();
this.prefix = "XYZ";
}
public Group(String prefix) {
this.persons = new ArrayList<GroupPerson>();
this.prefix = prefix;
}
public Group(List<GroupPerson> persons, String prefix) {
this.persons = new ArrayList<GroupPerson>();
// Protective
for(GroupPerson gp : persons) {
this.persons.add(new GroupPerson(gp.getName()));
}
this.prefix = prefix;
}

public void addPerson(GroupPerson person) {
this.persons.add(person);
}

public void removePerson(int personIndex) {
this.persons.remove(personIndex);
}

public void setPrefix(String prefix) {
this.prefix = prefix;
}
public String getName() {
return this.prefix;
}
public int size() {
return persons.size();
}
public GroupPerson getPerson(int index) {
return persons.get(index);
}
public List<GroupPerson> getPersons() {
return persons;
}
}
54 changes: 54 additions & 0 deletions src/main/java/xyz/risingthumb/iff/classes/GroupManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package xyz.risingthumb.iff.classes;

import java.util.ArrayList;
import java.util.List;

public class GroupManager {
private List<Group> groups;
private int groupIndex = 0;

public GroupManager() {
this.groups = new ArrayList<Group>();
}

public void addGroup(Group group) {
this.groups.add(group);
}
public void removeGroup(int indexToRemove) {
// We remove based on index
this.groups.remove(indexToRemove);
modifyGroupIndex(-1);
}
public void modifyGroupIndex(int changeValue) {
this.groupIndex+=changeValue;
// If there's no groups. literally do nothing
if (groups.size()==0) {
this.groupIndex = 0;
return;
}
// Bounds
if (groupIndex < 0) {
groupIndex = groups.size()-1;
}
if (groupIndex >= groups.size()) {
groupIndex = 0;
}
}

public int getSize() {
return groups.size();
}

public String getNameOfGroup(int index) {
return groups.get(index).getName();
}

public Group getGroup(int index) {
return groups.get(index);
}

public List<Group> getGroups() {
return groups;
}

}
19 changes: 19 additions & 0 deletions src/main/java/xyz/risingthumb/iff/classes/GroupPerson.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package xyz.risingthumb.iff.classes;

public class GroupPerson {
String name;

public GroupPerson(String name) {
this.name = name;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;

}

}
8 changes: 8 additions & 0 deletions src/main/java/xyz/risingthumb/iff/classes/Settings.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package xyz.risingthumb.iff.classes;

public class Settings {
public static boolean cancel = false;
public static boolean moveToLoc = false;
public static boolean lootChest = false;
public static boolean cancelLootChest = false;
}

0 comments on commit 451678d

Please sign in to comment.