Skip to content

Instantly share code, notes, and snippets.

Parameters:
Count: This is literal. The count parameter specifies how many particles to spawn at once
with these exact same parameters.
Spread: The starting position of each particle is a normal number with mean of the Location
and standard deviation of the Spread, e.g. (Norm(Loc.X, Spread.X), Norm(Loc.Y,
Spread.Y), Norm(Loc.Z, Spread.Z)). This means that 68% of the particles will be
within the bounding box of +/- 1*Spread, 95% will be within +/- 2*Spread, and 99.7%
will be within +/- 3*Spread for each coordinate.
Speed: The effect of this is determined by each particle.
1) Not use complete sentences.
2) Use the enter button as a period.
3) Use txt spch.
4) Use away messages (especially auto-away).
5) Ping people who don't need your attention.
6) Make 'your mom' jokes.
7) spammmmmmmmmmmm
Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(this, new Runnable(){
@Override
public void run() {
for(Player p : Bukkit.getOnlinePlayers()){//Gets all the online platers
if(p.getInventory().getArmorContents() != null){
for(ItemStack armour : p.getInventory().getArmorContents()){
armour.setDurability((short)0);//Keeping durability at a constant durability
}
}
@CeramicTitan
CeramicTitan / gist:6742064
Created September 28, 2013 13:27
Super old mining plugin.
package me.ceramictitan.aurimine;
import java.util.logging.Level;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Effect;
import org.bukkit.Material;
lastHit.put(victim.getName(), attacker.getName());
final Player vic = victim.getPlayer();
final BukkitScheduler scheduler = Bukkit.getScheduler();
if (lastHitId.containsKey(vic.getName())) {
int taskId = lastHitId.get(vic.getName());
if (scheduler.isCurrentlyRunning(taskId)) {
scheduler.cancelTask(taskId);
}
}
BukkitTask task = scheduler.runTaskLater(plugin, new BukkitRunnable() {
public String format(List<String> list){
boolean isFirst = true;
StringBuilder sb = new StringBuilder();
for(String entry : list) {
if (isFirst) {
isFirst = false;
} else {
sb.append(",");
}
JPanel panel_1 = new JPanel();
panel_1.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Student Ranks", TitledBorder.LEADING, TitledBorder.TOP, null, null));
panel_1.setBounds(6, 0, 534, 421);
frame.getContentPane().add(panel_1);
panel_1.setLayout(null);
String[] columnNames = {"Names","Level"};
Object[][] data = utils.populateTable();
JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(6, 18, 522, 396);
panel_1.add(scrollPane);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
div{font-size:150%}
#underline{
border-top: 5px solid black;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.button{
background: #FFF;
border: 2px solid black;