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
public class PlayerDamageHistory { | |
public static PlayerDamageHistory createDamageHistory(String attacker) { | |
return new PlayerDamageHistory(attacker); | |
} | |
private final String attacker; | |
private final long time; | |
private PlayerDamageHistory(String attacker) { |
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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* A utility which will join together arguments based on the use of quotations. | |
*/ | |
public class ArgumentJoiner { | |
/** |
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 class SingleWordFilter { | |
private static final String OBSCURING_CHARACTERS_REGEX = "[\\W_]*"; | |
public static SingleWorldFilter getSingleWordFilter(String singleWord) { | |
return new SingleWordFilter(singleWord); | |
} | |
private final String wordToFilter; |
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; |
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
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
<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
/* 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
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; |