I would like to know what is "Magic" near the getInstance(). I found it in an answer of this reply of this question (Setting the block underneath any player to glowstone, then setting it back to the original material) so I would like to know what is Magic as it isn't working and how to fix it. Magic cannot be resolved is what the error says.
package me.deltarift.walkonwater;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class WalkOnWater extends JavaPlugin {
@EventHandler
public void onStep(PlayerMoveEvent pme) {
Player player = pme.getPlayer();
final Block block = player.getLocation().subtract(0, 1, 0).getBlock();
final Material type = block.getType();
if(!type.equals(Material.GLOWSTONE)){
@SuppressWarnings("deprecation")
Material m = player.getItemInHand().getType();
if (m == Material.GLOWSTONE) {
if(type.isSolid()) {
block.setType(Material.GLOWSTONE);
Bukkit.getScheduler().runTaskLater(Magic.getInstance(), new Runnable(){
public void run(){
block.setType(type);
}
},10L);
}
}
}
}
}