Skip to content

Commit 417e0dd

Browse files
committed
fix: fix Player::addEffect
1 parent b1b29d1 commit 417e0dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/legacy/api/PlayerAPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3659,8 +3659,8 @@ Local<Value> PlayerClass::addEffect(const Arguments& args) {
36593659
if (!player) {
36603660
return Boolean::newBoolean(false);
36613661
}
3662-
unsigned int id = args[0].asNumber().toInt32();
3663-
int tick = args[1].asNumber().toInt32();
3662+
unsigned int id = args[0].asNumber().toInt32();
3663+
EffectDuration duration{args[1].asNumber().toInt32()};
36643664
int level = args[2].asNumber().toInt32();
36653665
bool showParticles = args[3].asBoolean().value();
36663666
MobEffectInstance effect(id);

0 commit comments

Comments
 (0)