mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Limit setBurnTime to valid short values
This commit is contained in:
@@ -52,8 +52,8 @@ public class FurnaceBurnEvent extends BlockEvent implements Cancellable {
|
|||||||
*
|
*
|
||||||
* @param burnTime the burn time for this fuel
|
* @param burnTime the burn time for this fuel
|
||||||
*/
|
*/
|
||||||
public void setBurnTime(int burnTime) {
|
public void setBurnTime(@org.jetbrains.annotations.Range(from = Short.MIN_VALUE, to = Short.MAX_VALUE) int burnTime) { // Paper
|
||||||
this.burnTime = burnTime;
|
this.burnTime = Math.max(Short.MIN_VALUE, Math.min(Short.MAX_VALUE, burnTime)); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user