mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-12 15:07:22 +01:00
Change too big message, disable reflection for scoreboard for now on 1.20.4
This commit is contained in:
parent
14ae9c9e6e
commit
c7d8e44169
@ -143,13 +143,13 @@ public class LDUploadLogs implements LDCommand {
|
|||||||
|
|
||||||
if (isTooBig(latest)) {
|
if (isTooBig(latest)) {
|
||||||
sender.sendMessage(
|
sender.sendMessage(
|
||||||
ChatColor.RED + "Your latest.log file is too big! It should be less than 512kb! Please restart and run this " + "command again!");
|
ChatColor.RED + "Your latest.log file is too big! It should be less than 10mb! Please restart and run this " + "command again!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isTooBig(disguises)) {
|
if (isTooBig(disguises)) {
|
||||||
sender.sendMessage(ChatColor.RED + "Your disguises.yml is too big! You'll need to trim that file down before using this command! It " +
|
sender.sendMessage(ChatColor.RED + "Your disguises.yml is too big! You'll need to trim that file down before using this command! It " +
|
||||||
"should be less than 512kb!");
|
"should be less than 10mb!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ public class LDUploadLogs implements LDCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isTooBig(long length) {
|
private boolean isTooBig(long length) {
|
||||||
return length > 10_000_000;
|
return length > 10_048_000;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2540,6 +2540,11 @@ public class ReflectionManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setScore(Scoreboard scoreboard, String name, int score, boolean canScheduleTask) {
|
public static void setScore(Scoreboard scoreboard, String name, int score, boolean canScheduleTask) {
|
||||||
|
// Disabled for 1.20.4, 1.20.4 introduces "read only" scores and I don't have an idea on how to deal with it as yet
|
||||||
|
if (NmsVersion.v1_20_R3.isSupported()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (canScheduleTask && (!Bukkit.isPrimaryThread() || DisguiseUtilities.isRunningPaper())) {
|
if (canScheduleTask && (!Bukkit.isPrimaryThread() || DisguiseUtilities.isRunningPaper())) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user