This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MyInterface { } | |
public class SomePlugin extends JavaPlugin implements MyInterface { | |
static { | |
SerializationRegistrar.registerClass(Config.class); | |
SerializationRegistrar.registerClass(Config.Time.class); | |
} | |
private JdbcAgent jdbcAgent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) dumptruckman 2014 | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
import org.bukkit.Location; | |
import org.bukkit.Material; | |
import org.bukkit.block.Block; | |
import org.bukkit.entity.Entity; | |
import org.bukkit.entity.LivingEntity; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class CountdownTask implements Runnable { | |
private boolean started = false; | |
private boolean dead = false; | |
private int countdown; | |
private long lastTime = 0L; | |
private final Set<Integer> warnings = new HashSet<Integer>(); | |
private final Plugin plugin; | |
public CountdownTask(final Plugin plugin, final int countdown) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.minecraft.server.EntityPlayer; | |
import org.bukkit.craftbukkit.entity.CraftPlayer; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.EventPriority; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.player.PlayerLoginEvent; | |
import org.bukkit.event.player.PlayerQuitEvent; | |
import org.bukkit.plugin.Plugin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) dumptruckman 2012 | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public | |
* License, v. 2.0. If a copy of the MPL was not distributed with this | |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
import org.bukkit.Material; | |
import org.bukkit.inventory.Inventory; | |
import org.bukkit.inventory.ItemStack; | |
import java.util.ArrayList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-javadoc-plugin</artifactId> | |
<version>2.9</version> | |
<executions> | |
<execution> | |
<id>non-aggregate</id> | |
<phase>package</phase> | |
<goals> | |
<goal>jar</goal> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class QueryGen { | |
public abstract String createXTable(); | |
public String selectPlayerData(String playerName) { | |
return "SELECT..."; | |
} | |
} | |
public class MySqlQueryGen extends QueryGen { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void checkGameEnd() { | |
Set<GamePlayer> onlinePlayers = getOnlinePlayers(); | |
List<GamePlayer> onlineZombies = new LinkedList<GamePlayer>(); | |
List<GamePlayer> onlineHumans = new LinkedList<GamePlayer>(); | |
for (GamePlayer player : onlinePlayers) { | |
if (player.isZombie()) { | |
onlineZombies.add(player); | |
} else { | |
onlineHumans.add(player); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.bukkit.plugin.Plugin; | |
import org.bukkit.scheduler.BukkitRunnable; | |
import java.text.DecimalFormat; | |
import java.util.LinkedList; | |
import java.util.ListIterator; | |
public class TicksPerSecondTask extends BukkitRunnable { | |
private static final long NUM_TICKS = 20L; |
OlderNewer