This is what i have in my Magic class:
Code:
package com.rs2hd.content;
import com.rs2hd.packethandler.ActionButtonPacketHandler;
import com.rs2hd.model.Player;
import com.rs2hd.net.Packet;
import com.rs2hd.event.Event;
import com.rs2hd.model.World;
public class Magic {
Player p;
ActionButtonPacketHandler ab;
Packet packet;
public static int homeTele = 0;
/**
*This is the constructor
*/
public Magic(Player p) {
this.p = p;
}
public void teleportButtons() {
World.getInstance().registerEvent(new Event(homeTele) {
@Override
public void execute() {
if (homeTele == -1) {
this.stop();
return;
}
if (homeTele == 4) {
p.animate(4847);
} else if (homeTele == 3) {
p.animate(4850);
} else if (homeTele == 2) {
p.animate(4851);
} else if (homeTele == 1) {
p.animate(4852);
homeTele = 0;
}
if (homeTele > 0) {
homeTele--;
}
}
}, 600);
}
}
and this is the error i am getting:
Code:
Preparing...
A subdirectory or file bin already exists.
1 file(s) copied.
1 file(s) moved.
Compiling core...
src\com\rs2hd\content\Magic.java:27: registerEvent(com.rs2hd.event.Event) in com
.rs2hd.model.World cannot be applied to (<anonymous com.rs2hd.event.Event>,int)
World.getInstance().registerEvent(new Event(homeTele) {
^
1 error
Compiling packet handlers...