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
package org.curlybrace.double0negative.ChatLimiter; | |
import java.util.Date; | |
import java.util.HashMap; | |
import org.bukkit.ChatColor; | |
import org.bukkit.entity.Player; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.EventPriority; | |
import org.bukkit.event.Listener; |
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
for(String[] msg:messagequeue){ | |
int x = getSignMidPoint()[1] - (msg.length / 2); | |
int lineno = x%3; | |
x = x / 4; | |
System.out.println(x); | |
for(int a = msg.length-1; a>-1;a--){ | |
int y = getSignMidPoint()[0] - (msg[a].length() / 2); | |
System.out.println(msg[a]); | |
char[] line = msg[a].toCharArray(); |
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
package com.skitscape.survivalgames.util; | |
import java.lang.management.ManagementFactory; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Location; | |
import org.bukkit.World; | |
import org.bukkit.util.Vector; |
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 boolean addPlayer(Player p){ | |
p.sendMessage(gameID+" "+ SettingsManager.getInstance().getSpawnCount(gameID)+" "+activePlayers.size()); | |
if(mode == GameMode.WAITING){ | |
if(activePlayers.size() < SettingsManager.getInstance().getSpawnCount(gameID)){ | |
activePlayers.add(p); | |
p.sendMessage("Joining Arena " + gameID); | |
boolean placed = false; | |
for(int a = 1; a<SettingsManager.getInstance().getSpawnCount(gameID); a++){ | |
if(!spawns.get(a)){ |
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
package com.skitscape.survivalgames.util; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Random; | |
import org.bukkit.inventory.ItemStack; | |
public class ChestRatioStorage { |
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.lang.management.ManagementFactory; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Chunk; | |
import org.bukkit.Location; | |
import org.bukkit.World; | |
import org.bukkit.craftbukkit.CraftChunk; | |
import org.bukkit.util.Vector; | |
import com.skitscape.survivalgames.Game; |
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.io.DataInputStream; | |
import java.io.OutputStream; | |
import java.net.Socket; | |
public class Pinger { | |
@SuppressWarnings("deprecation") | |
public static int [] ping(String ip, int port){ |
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
package org.mcsg.survivalgames.util; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.PreparedStatement; | |
import java.sql.SQLException; | |
import java.sql.Statement; | |
import java.util.logging.Logger; | |
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
class DatabaseDumper extends Thread{ | |
PreparedStatement s; | |
public void run(){ | |
s = dbman.createStatement("INSERT INTO "+SettingsManager.getSqlPrefix()+"blocks VALUES (?,?,?,?,?,?,?,?,?,?)"); | |
while(queue.size()>0){ | |
BlockData b = queue.remove(0); | |
try{ | |
s.setInt(1, gameid); | |
s.setString(2,b.getWorld()); | |
s.setInt(3, b.getPrevid()); |
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
ResultSet result; | |
try{ | |
String query = "SELECT * FROM "+SettingsManager.getSqlPrefix()+"blocks WHERE gameid="+id+" ORDER BY time DESC"; | |
Statement s = dbman.createStatement(); | |
result = s.executeQuery(query); | |
}catch(Exception e){} | |
while(result.next()){ |
OlderNewer