mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-27 14:13:11 +02:00
Don't create order twice.
This commit is contained in:
parent
d2ed656409
commit
f82d387a88
@ -207,17 +207,17 @@ public class RegisteredItemStore {
|
|||||||
// Better support this to avoid confusion (?).
|
// Better support this to avoid confusion (?).
|
||||||
order = ((IGetRegistrationOrder) item).getRegistrationOrder();
|
order = ((IGetRegistrationOrder) item).getRegistrationOrder();
|
||||||
}
|
}
|
||||||
// Check Annotations.
|
//
|
||||||
if (order == null) {
|
if (order == null) {
|
||||||
|
// Check Annotations.
|
||||||
RegisterWithOrder annoOrder = item.getClass().getAnnotation(RegisterWithOrder.class);
|
RegisterWithOrder annoOrder = item.getClass().getAnnotation(RegisterWithOrder.class);
|
||||||
if (annoOrder != null) {
|
if (annoOrder != null) {
|
||||||
order = new RegistrationOrder(annoOrder);
|
order = new RegistrationOrder(annoOrder);
|
||||||
}
|
}
|
||||||
}
|
else {
|
||||||
//
|
// Default order.
|
||||||
if (order == null) {
|
order = RegistrationOrder.DEFAULT_ORDER;
|
||||||
// Default order.
|
}
|
||||||
order = RegistrationOrder.DEFAULT_ORDER;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Copy what has been found outside, huh.
|
// Copy what has been found outside, huh.
|
||||||
|
Loading…
Reference in New Issue
Block a user