mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
SPIGOT-4887: Villager level minimum is 1
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
7dd4483ca3
commit
b1a791b5e5
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setVillagerLevel(int level) {
|
public void setVillagerLevel(int level) {
|
||||||
Preconditions.checkArgument(0 <= level && level <= 5, "level must be between [0, 5]");
|
Preconditions.checkArgument(1 <= level && level <= 5, "level must be between [1, 5]");
|
||||||
|
|
||||||
getHandle().setVillagerData(getHandle().getVillagerData().withLevel(level));
|
getHandle().setVillagerData(getHandle().getVillagerData().withLevel(level));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue