Merge pull request #58 from Parabot/bugfix/class-cast-exception

[BUGFIX] Fixed ClassCastException
This commit is contained in:
Jeroen Ketelaar
2018-03-06 19:23:54 +01:00
committed by GitHub
@@ -1,9 +1,9 @@
package org.parabot.randoms.soulplay; package org.parabot.randoms.soulplay;
import org.parabot.core.Context;
import org.parabot.core.reflect.RefClass; import org.parabot.core.reflect.RefClass;
import org.parabot.environment.randoms.Random; import org.parabot.environment.randoms.Random;
import org.parabot.environment.randoms.RandomType; import org.parabot.environment.randoms.RandomType;
import org.rev317.min.Loader;
/** /**
* @author SCoutinho * @author SCoutinho
@@ -15,7 +15,7 @@ public class RandomUUID implements Random {
private long number; private long number;
public RandomUUID() { public RandomUUID() {
this.clientClass = (RefClass) Context.getInstance().getClient(); this.clientClass = new RefClass(Loader.getClient());
this.number = (long) Math.floor(Math.random() * 9000000000L) + 1000000000L; this.number = (long) Math.floor(Math.random() * 9000000000L) + 1000000000L;
} }