mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-28 17:47:41 +01:00
UI improvements & action colours
This commit is contained in:
parent
19efdeff89
commit
ea69bf0dc5
@ -658,7 +658,7 @@ public class LookupCommand {
|
|||||||
final Integer[] radius = argRadius;
|
final Integer[] radius = argRadius;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Phrase.build(Phrase.LOOKUP_SEARCHING));
|
Chat.sendMessage(player, Color.DARK_AQUA + "CoreProtect " + Color.WHITE + "- " + Color.ITALIC + Phrase.build(Phrase.LOOKUP_SEARCHING));
|
||||||
final CommandSender player2 = player;
|
final CommandSender player2 = player;
|
||||||
final int finalX = x;
|
final int finalX = x;
|
||||||
final int finalY = y;
|
final int finalY = y;
|
||||||
@ -787,7 +787,7 @@ public class LookupCommand {
|
|||||||
else if (pageStart < rows) {
|
else if (pageStart < rows) {
|
||||||
List<String[]> lookupList = Lookup.performPartialLookup(statement, player2, uuidList, userList, blist, elist, euserlist, finalArgAction, location, radius, rowData, stime, (int) pageStart, displayResults, restrict_world, true);
|
List<String[]> lookupList = Lookup.performPartialLookup(statement, player2, uuidList, userList, blist, elist, euserlist, finalArgAction, location, radius, rowData, stime, (int) pageStart, displayResults, restrict_world, true);
|
||||||
|
|
||||||
Chat.sendMessage(player2, Color.WHITE + "----- " + Color.DARK_AQUA + Phrase.build(Phrase.LOOKUP_HEADER, "CoreProtect") + Color.WHITE + " -----");
|
Chat.sendMessage(player2, Color.WHITE + "----- " + Color.DARK_AQUA + Phrase.build(Phrase.LOOKUP_HEADER, "CoreProtect" + Color.WHITE + " | " + Color.DARK_AQUA) + Color.WHITE + " -----");
|
||||||
if (finalArgAction.contains(6) || finalArgAction.contains(7)) { // Chat/command
|
if (finalArgAction.contains(6) || finalArgAction.contains(7)) { // Chat/command
|
||||||
for (String[] data : lookupList) {
|
for (String[] data : lookupList) {
|
||||||
String time = data[0];
|
String time = data[0];
|
||||||
@ -816,7 +816,8 @@ public class LookupCommand {
|
|||||||
leftPadding = leftPadding + Color.WHITE + Strings.padStart("", (timeLength - 50) / 4, ' ');
|
leftPadding = leftPadding + Color.WHITE + Strings.padStart("", (timeLength - 50) / 4, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
Chat.sendComponent(player2, timeago + " " + Color.WHITE + "- " + Color.DARK_AQUA + Phrase.build(Phrase.LOOKUP_LOGIN, Color.DARK_AQUA + dplayer + Color.WHITE, (action != 0 ? Selector.FIRST : Selector.SECOND)));
|
String tag = (action != 0 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
|
Chat.sendComponent(player2, timeago + " " + tag + " " + Color.DARK_AQUA + Phrase.build(Phrase.LOOKUP_LOGIN, Color.DARK_AQUA + dplayer + Color.WHITE, (action != 0 ? Selector.FIRST : Selector.SECOND)));
|
||||||
Chat.sendComponent(player2, Color.WHITE + leftPadding + Color.GREY + "^ " + Util.getCoordinates(command.getName(), wid, x, y, z, true, true) + "");
|
Chat.sendComponent(player2, Color.WHITE + leftPadding + Color.GREY + "^ " + Util.getCoordinates(command.getName(), wid, x, y, z, true, true) + "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -920,16 +921,19 @@ public class LookupCommand {
|
|||||||
if (daction == 2 || daction == 3) {
|
if (daction == 2 || daction == 3) {
|
||||||
phrase = Phrase.LOOKUP_ITEM; // {picked up|dropped}
|
phrase = Phrase.LOOKUP_ITEM; // {picked up|dropped}
|
||||||
selector = (daction != 2 ? Selector.FIRST : Selector.SECOND);
|
selector = (daction != 2 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (daction != 2 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
action = "a:inventory";
|
action = "a:inventory";
|
||||||
}
|
}
|
||||||
else if (daction == 4 || daction == 5) {
|
else if (daction == 4 || daction == 5) {
|
||||||
phrase = Phrase.LOOKUP_STORAGE; // {deposited|withdrew}
|
phrase = Phrase.LOOKUP_STORAGE; // {deposited|withdrew}
|
||||||
selector = (daction != 4 ? Selector.FIRST : Selector.SECOND);
|
selector = (daction != 4 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (daction != 4 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
action = "a:inventory";
|
action = "a:inventory";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
phrase = Phrase.LOOKUP_CONTAINER; // {added|removed}
|
phrase = Phrase.LOOKUP_CONTAINER; // {added|removed}
|
||||||
selector = (daction != 0 ? Selector.FIRST : Selector.SECOND);
|
selector = (daction != 0 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (daction != 0 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
action = "a:container";
|
action = "a:container";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -939,14 +943,15 @@ public class LookupCommand {
|
|||||||
if (daction == 2 || daction == 3) {
|
if (daction == 2 || daction == 3) {
|
||||||
phrase = Phrase.LOOKUP_INTERACTION; // {clicked|killed}
|
phrase = Phrase.LOOKUP_INTERACTION; // {clicked|killed}
|
||||||
selector = (daction != 3 ? Selector.FIRST : Selector.SECOND);
|
selector = (daction != 3 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (daction != 3 ? Color.WHITE + "-" : Color.RED + "-");
|
||||||
action = (daction == 2 ? "a:click" : "a:kill");
|
action = (daction == 2 ? "a:click" : "a:kill");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
phrase = Phrase.LOOKUP_BLOCK; // {placed|broke}
|
phrase = Phrase.LOOKUP_BLOCK; // {placed|broke}
|
||||||
selector = (daction != 0 ? Selector.FIRST : Selector.SECOND);
|
selector = (daction != 0 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (daction != 0 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
// tag = ChatColors.RED + "-";
|
|
||||||
Chat.sendComponent(player2, timeago + " " + tag + " " + Phrase.build(phrase, Color.DARK_AQUA + rbd + dplayer + Color.WHITE + rbd, Color.DARK_AQUA + rbd + dname + Color.WHITE, selector));
|
Chat.sendComponent(player2, timeago + " " + tag + " " + Phrase.build(phrase, Color.DARK_AQUA + rbd + dplayer + Color.WHITE + rbd, Color.DARK_AQUA + rbd + dname + Color.WHITE, selector));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,13 +91,16 @@ public class BlockLookup {
|
|||||||
|
|
||||||
Phrase phrase = Phrase.LOOKUP_BLOCK;
|
Phrase phrase = Phrase.LOOKUP_BLOCK;
|
||||||
String selector = Selector.FIRST;
|
String selector = Selector.FIRST;
|
||||||
|
String tag = Color.WHITE + "-";
|
||||||
if (resultAction == 2 || resultAction == 3) {
|
if (resultAction == 2 || resultAction == 3) {
|
||||||
phrase = Phrase.LOOKUP_INTERACTION; // {clicked|killed}
|
phrase = Phrase.LOOKUP_INTERACTION; // {clicked|killed}
|
||||||
selector = (resultAction != 3 ? Selector.FIRST : Selector.SECOND);
|
selector = (resultAction != 3 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (resultAction != 3 ? Color.WHITE + "-" : Color.RED + "-");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
phrase = Phrase.LOOKUP_BLOCK; // {placed|broke}
|
phrase = Phrase.LOOKUP_BLOCK; // {placed|broke}
|
||||||
selector = (resultAction != 0 ? Selector.FIRST : Selector.SECOND);
|
selector = (resultAction != 0 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
tag = (resultAction != 0 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
}
|
}
|
||||||
|
|
||||||
String rbFormat = "";
|
String rbFormat = "";
|
||||||
@ -126,7 +129,7 @@ public class BlockLookup {
|
|||||||
target = target.split(":")[1];
|
target = target.split(":")[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
resultTextBuilder.append(timeAgo + " " + Color.WHITE + "- ").append(Phrase.build(phrase, Color.DARK_AQUA + rbFormat + resultUser + Color.WHITE + rbFormat, Color.DARK_AQUA + rbFormat + target + Color.WHITE, selector)).append("\n");
|
resultTextBuilder.append(timeAgo + " " + tag + " ").append(Phrase.build(phrase, Color.DARK_AQUA + rbFormat + resultUser + Color.WHITE + rbFormat, Color.DARK_AQUA + rbFormat + target + Color.WHITE, selector)).append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
resultText = resultTextBuilder.toString();
|
resultText = resultTextBuilder.toString();
|
||||||
|
@ -95,6 +95,7 @@ public class ChestTransactionLookup {
|
|||||||
found = true;
|
found = true;
|
||||||
|
|
||||||
String selector = (resultAction != 0 ? Selector.FIRST : Selector.SECOND);
|
String selector = (resultAction != 0 ? Selector.FIRST : Selector.SECOND);
|
||||||
|
String tag = (resultAction != 0 ? Color.GREEN + "+" : Color.RED + "-");
|
||||||
String rbFormat = "";
|
String rbFormat = "";
|
||||||
if (resultRolledBack == 1) {
|
if (resultRolledBack == 1) {
|
||||||
rbFormat = Color.STRIKETHROUGH;
|
rbFormat = Color.STRIKETHROUGH;
|
||||||
@ -115,7 +116,7 @@ public class ChestTransactionLookup {
|
|||||||
target = target.split(":")[1];
|
target = target.split(":")[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
resultBuilder.append(timeAgo + " " + Color.WHITE + "- ").append(Phrase.build(Phrase.LOOKUP_CONTAINER, Color.DARK_AQUA + rbFormat + resultUser + Color.WHITE + rbFormat, "x" + resultAmount, Color.DARK_AQUA + rbFormat + target + Color.WHITE, selector)).append("\n");
|
resultBuilder.append(timeAgo + " " + tag + " ").append(Phrase.build(Phrase.LOOKUP_CONTAINER, Color.DARK_AQUA + rbFormat + resultUser + Color.WHITE + rbFormat, "x" + resultAmount, Color.DARK_AQUA + rbFormat + target + Color.WHITE, selector)).append("\n");
|
||||||
}
|
}
|
||||||
result = resultBuilder.toString();
|
result = resultBuilder.toString();
|
||||||
results.close();
|
results.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user