I have a plugin for minecraft Programmiert but there's an error in source code and indeed}, |: 20, type.getTime (); At the end of the source code we always use |: and () in my Java programming tool eclipse. Underneath can someone help me?
package freesteak.block;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
public class FreeSteak {
private int sched;
private location location;
private type type;
public enum Type {
STEAK (Material.CLAY_BRICK, "§aBromze", 20),
GOLD (Material.GOLD_INGOT, "§aGold", 3020),
IRON (Material.IRON_INGOT, "§aEisen", 1520);
private material;
private string name;
private int time;
Type (Material material, String name, int time) {
this material = material;
this.name = name;
}
public material getMaterial () {
return material;
}
public String getName () {
return name;
}
public int getTime () {
return time;
}
}
public void ItemSpower (Location location, Type type) {
this.location = location;
this.type = type;
}
public void startSpawning () {
sched = Bukkit.getScheduler (). ScheduleSyncRepeatingTask (Main.getPlugin (Main.class), new Runnable () {
@Override
public void run () {
location.getWorld (). DropItemNaturally (location, new ItemBuilder (type.getMaterial ()). Name (type.getName ()). Build ());
}
}, |: 20, type.getTime ();
}
public void stopSpawning () {
Bukkit.getScheduler () cancelTask (sched).
Yes, what should
|: 20
because represent?
You also do not close the argument list of scheduleSyncRepeatingTask (with a closing parenthesis).
I wanted to say how often the objects are stretched
So the materials spawn every 20 ticks
But probably enough for the 20 as an indication. The |: is an unknown symbol for the compiler.
OK thank you
And what should I do then stat a round bracket please?
Nothing at all. You add that, right after the last argument, which you give to scheduleSyncRepeatingTask.
And what should I write instead of the round brackets?
Why do you want to write something else instead of the parenthesis?