1.5.0
Added Server Rules Section. Finished.
This commit is contained in:
1 parent
1ee460687d
commit
6eea38d344
3 files changed
+56
-4
No files matched your search
@@ -179,11 +179,25 @@ public class ItemsMenu {
|
|||||||
|
|
||||||
if (isSubCategory) {
|
if (isSubCategory) {
|
||||||
|
|
||||||
|
int loreStart =
|
||||||
|
lore.size();
|
||||||
|
|
||||||
ItemsBuilder.applySubCategoryLore(
|
ItemsBuilder.applySubCategoryLore(
|
||||||
warehouseItem,
|
warehouseItem,
|
||||||
lore
|
lore
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
warehouseItem.categoryId() == 1000
|
||||||
|
|| warehouseItem.categoryId() == 1001
|
||||||
|
) {
|
||||||
|
|
||||||
|
lore.remove(
|
||||||
|
loreStart
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
|||||||
+25
-4
@@ -69,19 +69,37 @@ public class ServerRuleMaterialPickerMenuListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Previous page
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Current material picker page.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int page =
|
||||||
|
session.getPendingServerRuleMaterialPickerPage();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Previous page
|
* Previous page
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (event.getSlot() == 45) {
|
if (event.getSlot() == 45) {
|
||||||
|
|
||||||
|
session.setPendingServerRuleMaterialPickerPage(
|
||||||
|
Math.max(
|
||||||
|
0,
|
||||||
|
page - 1
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
ServerRuleMaterialPickerMenu.open(
|
ServerRuleMaterialPickerMenu.open(
|
||||||
player,
|
player,
|
||||||
0
|
session.getPendingServerRuleMaterialPickerPage()
|
||||||
);
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -91,13 +109,16 @@ public class ServerRuleMaterialPickerMenuListener
|
|||||||
|
|
||||||
if (event.getSlot() == 53) {
|
if (event.getSlot() == 53) {
|
||||||
|
|
||||||
|
session.setPendingServerRuleMaterialPickerPage(
|
||||||
|
page + 1
|
||||||
|
);
|
||||||
|
|
||||||
ServerRuleMaterialPickerMenu.open(
|
ServerRuleMaterialPickerMenu.open(
|
||||||
player,
|
player,
|
||||||
1
|
session.getPendingServerRuleMaterialPickerPage()
|
||||||
);
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+17
@@ -15,6 +15,8 @@ public class ServerRuleCreationSession {
|
|||||||
|
|
||||||
private String pendingServerRuleMaterial;
|
private String pendingServerRuleMaterial;
|
||||||
|
|
||||||
|
private int pendingServerRuleMaterialPickerPage = 0;
|
||||||
|
|
||||||
|
|
||||||
public String getPendingServerRuleName() {
|
public String getPendingServerRuleName() {
|
||||||
|
|
||||||
@@ -129,4 +131,19 @@ public class ServerRuleCreationSession {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getPendingServerRuleMaterialPickerPage() {
|
||||||
|
|
||||||
|
return pendingServerRuleMaterialPickerPage;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPendingServerRuleMaterialPickerPage(
|
||||||
|
int pendingServerRuleMaterialPickerPage
|
||||||
|
) {
|
||||||
|
|
||||||
|
this.pendingServerRuleMaterialPickerPage =
|
||||||
|
pendingServerRuleMaterialPickerPage;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user