inf
This commit is contained in:
1 parent
e1071ab668
commit
5b33291c28
2 files changed
+5
-2
No files matched your search
@@ -761,7 +761,7 @@ players, since they are controlled client side.
|
||||
### `modify(e, 'effect', name?, duration?, amplifier?, show_particles?, show_icon?, ambient?)`
|
||||
|
||||
Applies status effect to the living entity. Takes several optional parameters, which default to `0`, `true`,
|
||||
`true` and `false`. If no duration is specified, or if it's null or 0, the effect is removed. If duration is -1, it will represent infinity. If name is not specified,
|
||||
`true` and `false`. If no duration is specified, or if it's null or 0, the effect is removed. If duration is less than 0, or it is infinity, it will represent infinity. If name is not specified,
|
||||
it clears all effects.
|
||||
|
||||
### `modify(e, 'health', float)`
|
||||
|
||||
@@ -1483,11 +1483,14 @@ public class EntityValue extends Value
|
||||
return;
|
||||
}
|
||||
int duration = (int) NumericValue.asNumber(list.get(1)).getLong();
|
||||
if (duration <= 0 && duration != -1)
|
||||
if (duration == 0)
|
||||
{
|
||||
le.removeEffect(effect);
|
||||
return;
|
||||
}
|
||||
if (duration < 0 || Float.isInfinite(NumericValue.asNumber(list.get(1)).getFloat())){
|
||||
duration = -1;
|
||||
}
|
||||
int amplifier = 0;
|
||||
if (list.size() > 2)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user