Fix 1.12
This commit is contained in:
parent
44f90e51ee
commit
d6be1d76bd
@ -191,7 +191,7 @@ public class ReflectionManager {
|
|||||||
|
|
||||||
if (!NmsVersion.v1_13.isSupported()) {
|
if (!NmsVersion.v1_13.isSupported()) {
|
||||||
getObjectives = getNmsMethod("Scoreboard", "getObjectivesForCriteria", getNmsClass("IScoreboardCriteria"));
|
getObjectives = getNmsMethod("Scoreboard", "getObjectivesForCriteria", getNmsClass("IScoreboardCriteria"));
|
||||||
getPlayerScoreObjective = getNmsMethod("Scoreboard", "getObjectivesForCriteria", String.class, getNmsClass("IScoreboardCriteria"));
|
getPlayerScoreObjective = getNmsMethod("Scoreboard", "getPlayerScoreForObjective", String.class, getNmsClass("ScoreboardObjective"));
|
||||||
} else {
|
} else {
|
||||||
getObjectives = getNmsMethod("Scoreboard", "getObjectivesForCriteria", getNmsClass("IScoreboardCriteria"), String.class, Consumer.class);
|
getObjectives = getNmsMethod("Scoreboard", "getObjectivesForCriteria", getNmsClass("IScoreboardCriteria"), String.class, Consumer.class);
|
||||||
}
|
}
|
||||||
@ -1941,8 +1941,8 @@ public class ReflectionManager {
|
|||||||
if (!NmsVersion.v1_13.isSupported()) {
|
if (!NmsVersion.v1_13.isSupported()) {
|
||||||
Collection scores = (Collection) getObjectives.invoke(board, criteria);
|
Collection scores = (Collection) getObjectives.invoke(board, criteria);
|
||||||
|
|
||||||
for (Object obj : (Collection) getPlayerScoreObjective.invoke(board, name, criteria)) {
|
for (Object obj : scores) {
|
||||||
setScore.invoke(obj, score);
|
setScore.invoke(getPlayerScoreObjective.invoke(board, name, obj), score);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user