Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

bukkit runnable

// self cancelling example
new BukkitRunnable() {
	int timer = 10;

	@Override
	public void run() {
		if (timer == 0) cancel();
        else Bukkit.broadcastMessage("Starting in: " + timer--);
	}

	@Override // this code can be in run(), its here as a possibility
	public synchronized void cancel() throws IllegalStateException {
        Bukkit.broadcastMessage("Action!");
		super.cancel();
	}
}.runTaskTimer(Main.main(), 0L, 20L); // repeat every second
Comment

bukkit runnable

new BukkitRunnable() {
    @Override
    public void run() {

    }
}.runTaskTimer(Main.main(), 0L, 20L);
Comment

PREVIOUS NEXT
Code Example
Java :: java itemstatechanged called twice 
Java :: jbutton remove selection border 
Java :: set text size programmatically android 
Java :: javafx listview get item index 
Java :: padding a string with 0 in java 
Java :: how to take space separated input in java 
Java :: android up navigation 
Java :: jaxb exclude field 
Java :: Java algorithm for drawing a line 
Java :: stream to list 
Java :: android studio allow http 
Java :: java remove first element from array 
Java :: java double to string with 2 decimals 
Java :: leap year program in java 
Java :: hot to grand achievemnt to player spigot 
Java :: convert long to date in java 
Java :: java product 1 to n 
Java :: java joptionpane input 
Java :: java ee service formparam optional 
Java :: dialog box in java swing 
Java :: cast double to string java 
Java :: how Resolve FragmentManager fm =getActivity().getSupportFragmentManager(); 
Java :: list java processes 
Java :: spring data rest format time and date 
Java :: org.springframework.orm.jpa.EntityManagerHolder cannot be cast to org.springframework.orm.hibernate5.SessionHolder 
Java :: how to compare 3 numbers in java 
Java :: get block player is looking at bukkit 
Java :: java random Double between 
Java :: java event enter key 
Java :: get date by timezone java 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =