mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Check if item is active and added global items
This commit is contained in:
parent
68cd2eb4f1
commit
acc3a8222a
2 changed files with 9 additions and 1 deletions
|
@ -100,6 +100,10 @@ public final class NewsItem {
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isGlobal() {
|
||||||
|
return "all".equals(getProject());
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return active;
|
return active;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,11 @@ public class NewsHandler {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Constants.NEWS_PROJECT_LIST.contains(item.getProject())) {
|
if (!item.isActive()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!item.isGlobal() && !Constants.NEWS_PROJECT_LIST.contains(item.getProject())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue